f, s, *a = input().split()
print(" ".join([f, s] + [i for i in a[::-1][2::]] + a[::-1][:2][::-1]))