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