S=input().split(' ') if( S[0]=='T' ): if(S[1]=='T'): print('T T') else: print('F T') else: if(S[1]=='T'): print('T F') else: print('F F')