The average (arithmetic mean) of the 5 positive integers k, m, r, s, and t is 16, and k < m < r < s < t.  If t is 40, what is the greatest possible value of the median of the 5 integers?

16

18

19

20

22