# Code
l = input().split() # input().split() returns the list
l = l[len(l)-1:] + l[:-1] # last element being added at the start with the list slice that doesn’t contain the last element
print(l)
# Code
l = input().split() # input().split() returns the list
l = l[len(l)-1:] + l[:-1] # last element being added at the start with the list slice that doesn’t contain the last element
print(l)