l=list(map(int,input().split(' '))) print([*l[0:2],*reversed(l[2:-2:1]),*l[-2:]])