a, b = gets.split if b == 'T' if a == 'T' puts 'T T' else puts 'T F' end else if a == 'T' puts 'F T' else puts 'F F' end end