3. After teacher Mary Ivanovna moved Vovochka from the first row to the second, Vanechka from the second row to the third, and Mashenka from the third row to the first, the average age of students sitting in the first row increased by one week, those sitting in the second row increased by two weeks, and those sitting in the third row decreased by four weeks. It is known that there are 12 people sitting in the first and second rows. How many people are sitting in the third row?
3. Let there be x people in the third row. Since the average age is the sum of the ages divided by the number of people, after the rearrangement, the total age of the children in the first row increased by 12 weeks, in the second row by 24 weeks, and in the third row by -4x weeks. Since the total sum of the ages of all students could not have changed, $4x = 12 + 24$, i.e., $x = 9$.

Answer: 9 people.