S=list(input().split())

a=S[1]+S[0]

print(a)
S,T=input().split()

print((T+S))
S = list(input().split())
a = S[1] + S[0]
print(a)

S, T = input().split()
print((T + S))

-S = list(input().split()) -a = S[1] + S[0] -print(a) +S, T = input().split() +print((T + S))