Problem Description

Implement a Stack class with push/pop. POP on empty prints EMPTY. Print outputs for POP.

Input Format

First line q. Next q lines.

Output Format

Outputs for POP.

Sample Test Case

Input:
5 POP PUSH 7 PUSH 2 POP POP
Output:
EMPTY 2 7

Constraints

q

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next