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