Implement a stack of integers and process the commands from the input in order.
There are five commands.
The first line holds the number of commands N (1≤N≤10000). Each of the next N lines holds one command. The integer X of a push command satisfies 1≤X≤100000. No command outside the list above is given.
For every command that prints something, print its result on its own line, in the order the commands are given.