Note: When you click on Run, your code will execute against sample testcases only. On the other hand, selecting Verify will test your code against both the sample inputs and multiple hidden test cases. In order to successfully solve the problem, your code must pass all of these test cases. Lastly, to ensure your results are saved, you must Submit your code.
Time (sec)

0.10

Memory (KiB)

NA

Language

C++

Input

5
push 10
push 20
peek
push 30
peek
Output

Invalid input
Expected Output

20
30