#include <bits/stdc++.h>
using namespace std;

#include <atcoder/segtree.hpp>
int64_t op(int64_t a, int64_t b) { return max(a, b); }
int64_t e() { return -1; }

int main() {
    int64_t N, Q;
    cin >> N >> Q;
    vector<int64_t> A(N);
    for (int64_t& a : A) {
        cin >> a;
    }

    vector<int64_t> T(Q), X(Q), Y(Q);
    for (int64_t i = 0; i < Q; i++) {
        cin >> T[i] >> X[i] >> Y[i];
        X[i]--;
    }

    atcoder::segtree<int64_t, op, e> seg(A);

    for (int64_t i = 0; i < Q; i++) {
        if (T[i] == 1) {
            A[X[i]] = Y[i];
            seg.set(X[i], Y[i]);
        } else {
            if (N == 1) {
                cout << "F" << endl;
            } else {
                const int64_t pre = A[X[i]];
                A[X[i]] = 2;
                seg.set(X[i], 2);
                auto f = [&](int64_t x) { return x < 2; };
                const int64_t index = seg.min_left(Y[i], f);
                const int64_t diff = Y[i] - index;
                cout << (diff % 2 == 0 ? "F" : "S") << endl;
                A[X[i]] = pre;
                seg.set(X[i], pre);
            }
        }
    }
}