l = [int(i) for i in input().split()] print(* l[0:2] + list(reversed(l[2:len(l) - 2])) + l[len(l)-2:len(l)])