#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int N, Q, T, X, Y; cin >> N >> Q; vector A(N); set S; for(int i = 0; i < N; i++){ cin >> A[i]; if(A[i] >= 2)S.insert(i); } S.insert(-1); while(Q--){ cin >> T >> X >> Y; if(T == 1){ X--; A[X] = Y; if(Y >= 2)S.insert(X); else if(S.count(X))S.erase(X); }else{ X--; auto it = S.lower_bound(Y); it--; cout << ((Y - max(X, *it)) & 1 ? 'F' : 'S') << '\n'; } } }