Simulate the operations with the stack:
push x — insert value into the stack;
pop — delete the top element;
top — print the top element (without deleting it);
All pop commands are correct.
If stack is empty and top command arrives, print nothing.
Each line contains a single command.
For each top command print on a separate line the corresponding result.