#include using namespace std; using ll = long long; using pll = pair; #define drep(i, cc, n) for (ll i = (cc); i <= (n); ++i) #define rep(i, n) drep(i, 0, n - 1) #define all(a) (a).begin(), (a).end() #define pb push_back #define fi first #define se second const ll MOD = 1000000007; const ll MOD2 = 998244353; const ll INF = 1LL << 60; const ll MAX_N = 2e5; struct SegmentTree{ ll n; vector> dat; SegmentTree(ll n_){ n = 1; while(n < n_) n*=2; dat.resize(2*n, {0, false}); } void update(ll k, ll a){ k += n-1; if(a == 1) dat[k] = {1, true}; else dat[k] = {0, false}; while(k > 0){ k = (k-1)/2; if(dat[2*k+1].se && dat[2*k+2].se){ dat[k] = {dat[2*k+1].fi+dat[2*k+2].fi, true}; }else if(dat[2*k+2].se){ dat[k] = {dat[2*k+1].fi+dat[2*k+2].fi, false}; }else{ dat[k] = {dat[2*k+2].fi, false}; } } } // the minimun element of [a, b) ll query(ll a, ll b){return query_sub(a, b, 0, 0, n).fi;} pll query_sub(ll a, ll b, ll k, ll l, ll r){ if(r <= a || b <= l){ return {0, true}; }else if(a <= l && r <= b){ return dat[k]; }else{ pll vl = query_sub(a, b, 2*k+1, l, (l+r)/2); pll vr = query_sub(a, b, 2*k+2, (l+r)/2, r); if(vl.se && vr.se){ return {vl.fi+vr.fi, true}; }else if(vr.se){ return {vl.fi+vr.fi, false}; }else{ return {vr.fi, false}; } } } }; int main(){ ll n, q; cin >> n >> q; SegmentTree ST(n); rep(i, n){ ll a; cin >> a; ST.update(i, a); } vector ans; rep(i, q){ ll t, x, y; cin >> t >> x >> y; if(t == 1){ ST.update(x-1, y); }else{ if(ST.query(x-1, y)%2 == 0){ ans.pb('F'); }else{ ans.pb('S'); } } } rep(i, (ll)ans.size()) cout << ans[i] << endl; }