// No.627 ランダムウォークの軌跡 // https://yukicoder.me/problems/no/627 // #include using namespace std; char solve(int T); int main() { int T; cin >> T; char res = solve(T); cout << res << endl; } char solve(int T) { int prev; cin >> prev; if (prev != 1 && prev != -1) return 'F'; int current; for (auto i = 1; i < T; i++) { cin >> current; if (current != prev+1 and current != prev-1) return 'F'; prev = current; } return 'T'; }