import sys

list = [1,2,3,4,5]
list.pop()
print(list)
list.pop()
print(list)
list.append(int(input()))
print(list)