a = input().strip() if a == 'T F': print('F T') elif a == 'F T': print('T F') else: print(a)