Explanation
The median of a set of numbers is one for which the set contains an equal number of greater and lesser values. Besides Z, there are 8 numbers in the set, so that 4 must be greater and 4 lesser than Z. The 4 smallest values are 5, 7, 9, and 12. The 4 largest are 16, 18, 23, and 44. So Z must fall between 12 and 16.