Professional Documents
Culture Documents
Input
A number of lines (1,000,000). Each contains one command specified above. All
words in the command are in lower case and without space in int. There may be
multiple instances of the same word in the storage.
Output
Upon receiving command of 2, output the lexicographically lightest word from the
storage.
Sample Input
2
1 one
1 two
1 three
1 four
2
2
1 five
2
2
2
2
Sample Output
###
four
one
five
three
two
###