If the class used 27 colored pencils, that means 4 students had six pencils and four stencils. That means there is a fifth student that only had three colored pencils. If it follows the rule the student most likely only had two stencils. If this was the case then the class used 18 stencils.