A researcher is analyzing the ages of participants in a marathon training program. The ages of 12 participants are recorded as follows:
25, 30, 22, 35, 28, 40, 31, 29, 34, 27, 33, 26.
What is the median age of the participants?