The Codetikki astronomers record cosmic events as a stream of numbers. After each event, they must report the median of all events seen so far.
Given a stream of numbers, print the median of the list so far after each new element. Recall that the median of an even-numbered list is the average of the two middle numbers.