import string,sys; s=sys.stdin; a=[]; for l in s: a.append(l); print string.join([a[-1]]+a[0:-1],'')