Implement a stack that supports retrieving the minimum element in O(1) time, in addition to normal push/pop.
Input: n operations, one per line:
Output: for every TOP and GETMIN operation, print the resulting value on its own line. PUSH and POP produce no output.