The age (in years) of people participating in a dance competition are 12,14,20,16,18,14,12,22 and 25. Find the median of the data.