12. In the first quarter, Vasya had 5 math grades, with the most being fives. It turned out that the median of all grades was 4, and the arithmetic mean was 3.8. What grades could Vasya have had?
# Solution.

Let's write down Vasya's grades in ascending order. The grade in the third (middle) position will be 4. Therefore, the two grades to the right of it can only be $(4,4),(4,5)$, or $(5,5)$. The first two options are not suitable, as then the number of fours would be greater than the number of fives, which contradicts the condition. Therefore, the last two grades are fives.

Since the average of all grades is 3.8, the sum of all five grades is $3.8 \cdot 5 = 19$. Therefore, the first two grades (to the left of the four) together give $19 - 5 - 5 - 4 = 5$. Therefore, they can only be $(1,4)$ or $(2,3)$. The first option is impossible, as otherwise Vasya would have an equal number of fours and fives. Therefore, Vasya's grades are $(2,3,4,5,5)$.

Answer: $(2,3,4,5,5)$.