#include using namespace std; #define rep(i, n) for (int i=0; i node; BIT(int n) { size = n; node.resize(n+1); } void add(int i, int x) { i++; while (i<=size) { node[i] += x; i += i&(-i); } } int acc(int i) { int s = 0; while (i>0) { s += node[i]; i -= i&(-i); } return s; } }; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, Q; cin >> N >> Q; int A[N]; rep(i, N) cin >> A[i]; BIT bit(N); rep(i, N) bit.add(i, A[i]); while (Q--) { int T, X, Y; cin >> T >> X >> Y; if (T==1) { X--; bit.add(X, -A[X]); A[X] = Y; bit.add(X, A[X]); } else { int l = 0; int r = Y-X+1; while (l<=r) { int m = (l+r)/2; int c = bit.acc(Y)-bit.acc(Y-m); if (c==m) l = m+1; else r = m-1; } if (r%2==0) cout << "F" << endl; else cout << "S" << endl; } } }