L = [int(i) for i in input().split()]
print(*(L[:2] + L[-3:1:-1] + L[-2::1]))