a = input().split() print(" ".join(a[:2] + list(reversed(a[2:-2:])) + a[-2:]))