#include using namespace std; int main() { int64_t N, Q; cin >> N >> Q; vector A(N); for (int64_t& a : A) { cin >> a; } vector T(Q), X(Q), Y(Q); for (int64_t i = 0; i < Q; i++) { cin >> T[i] >> X[i] >> Y[i]; X[i]--; } for (int64_t i = 0; i < Q; i++) { if (T[i] == 1) { A[X[i]] = Y[i]; } else { if (N == 1) { cout << "F" << endl; } else { Y[i]--; const int64_t pre = A[X[i]]; A[X[i]] = 2; const auto itr = lower_bound(A.rbegin() + N - 1 - Y[i], A.rbegin() + N - X[i], 2); const int64_t index = itr - (A.rbegin() + N - 1 - Y[i]); cout << (index % 2 == 0 ? "F" : "S") << endl; A[X[i]] = pre; } } } }