import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String a = scan.next(); String b = scan.next(); scan.close(); String ans1, ans2; if(a.equals("T")) { ans2 = "T"; }else { ans2 = "F"; } if(b.equals("T")) { ans1 = "T"; }else { ans1 = "F"; } System.out.println(ans1 + " " + ans2); } }