Lale has just learned about a new and fashionable structure. That structure has push and pop methods.
Implement the stack with two operations.
Operation 1 - inserts a number into the stack.
Operation 2 removes the top element from the stack.
Note: For each 2 operation, print the value of the removed element. It is guaranteed that all operations are valid.
The first line contains the integer n~(1 \le n \le 10^5) indicating the number of operations. The next lines specify the operation, where the first number indicates the operation type and the second number indicates the number to be added (only for the "first" operation), which is a positive number not greater than 10^5.
Print all removed elements, each on a new line.

Example 1
Example 2