#include using namespace std; #define rep(i,n) for(int i = 0; i < (int)(n); ++i) #define rrep(i,n) for(int i = (int)(n) - 1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define Sort(a) sort(a.begin(), a.end()) #define RSort(a) sort(a.rbegin(), a.rend()) typedef long long int ll; typedef long double ld; typedef vector vi; typedef vector vll; typedef vector vc; typedef vector vst; typedef vector vd; typedef pair P; const long long INF = 0x1fffffffffffffff; const long long MOD = 1000000007; const long double PI = acos(-1); template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template inline T vin(T& vec, U n) { vec.resize(n); for(int i = 0; i < (int) n; ++i) cin >> vec[i]; return vec; } template inline void vout(T vec, string s = "\n"){ for(auto x : vec) cout << x << s; } template void in(T&... a){ (cin >> ... >> a); } void out(){ cout << '\n'; } template void out(const T& a, const Ts&... b){ cout << a; (cout << ... << (cout << ' ', b)); cout << '\n'; } template void inGraph(vector>& G, U n, U m, bool directed = false){ G.resize(n); for(int i = 0; i < m; i++){ int a, b; cin >> a >> b; a--, b--; G[a].push_back(b); if(!directed) G[b].push_back(a); } } ll n, q; vll a; void input(){ in(n, q); vin(a, n); } void solve(){ set s; s.insert(-1); rep(i, n){ if(a[i] >= 2) s.insert(i); } while(q--){ ll t, x, y; in(t, x, y); x--; if(t == 1){ if(y >= 2){ s.insert(x); } if(y == 1 && a[x] >= 2){ s.erase(x); } a[x] = y; }else{ auto iter = s.lower_bound(y); iter--; ll k = *iter; if(k < x){ if((y - x) % 2 == 1){ out("F"); }else{ out("S"); } }else{ if((y - k) % 2 == 1){ out("F"); }else{ out("S"); } } } } } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); input(); solve(); }