Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = []
- n = int(input())
- for i in range(n):
- c = input()
- if c[0] == '1':
- a.append(c[2:])
- if c[0] == '2':
- a.pop()
- if c[0] == '3':
- print(a[len(a)-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement