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