Input: The letter H.
Output: The output is a count of HOW MANY numbers have been input so far. This could be as small as zero.
Input: The letter M.
Output: The output is the MEDIAN of all the input numbers read so far. The median is a number that has no more than half of the input numbers below it and no more than half the input numbers above it. For example, if there have been five input numbers 2, 2, 3, 6 and 5, then the median is 3 since two of the five numbers are below 3 and two of the five numbers are above 3. Notice that if there has been an even number of inputs (such as 2, 3, 6, 5) then there may be several choices for the median (in this example, the median could be either 3 or 5). In this case, it does not matter whether the output is the 3 or the 5. If there has not yet been any input numbers, then the program should print the word "ERROR" instead of the median.
Input: The letter Q.
Output: The program outputs the word "END" and then stops.