arr = [int(i) for i in input().split()]
print(*arr[0:2], *arr[len(arr) - 3:1:-1], *arr[len(arr) - 2:len(arr)])