stack = [1, 2, 3, 4, 5];
x = int(input());
for i in range(0, 2):
    stack.pop();
    print(stack);
stack.append(x);
print(stack);