Write sample rule