a = list(map(int, input().split()))
print(*a[:2], *a[-3:1:-1], *a[-2:])