using System; class Program { static void Main(string[] args) { var line = Console.ReadLine().Split(' '); string prop,adv,bs,cont; prop = line[0]; adv = line[1]; bs = (adv == "T") ? "T" : "F"; cont = (prop == "T") ? "T" : "F"; Console.WriteLine("{0} {1}", bs, cont); } }