T=int(input()) x=[] for i in range(T): x.append(input()) for i in range(T-1): if(x[0]=='0'): print('F') break if(abs(int(x[i])-int(x[i+1]))!=1): print('F') break if(i==T-2): print('T')