a, b = input().split() if a != b: print(b, a) else: print(a, b)