a = list(map(int, input().split()))
print(a) if (len(a) == 4) else print(*a[0:2], *reversed(a[2: -2]), a[-2], a[-1])