s,t = map(str, input().split()) if s==t: print(s,t) else: print(t,s)