using System; namespace y { class Program { static void Main(string[] args) { string[] ss = Console.ReadLine().Split(); string ans = ""; if (ss[0] == ss[1]) { ans = ss[0] + " " + ss[1]; } else { ans = ss[0] == "F" ? "T" : "F"; ans += ss[1] == "F" ? " T" : " F"; } Console.WriteLine(ans); } } }