T, *X = map(int, open(0)) if all(abs(a - b) <= 1 for a, b in zip([9] + X, X)): print("T") else: print("F")