#include using namespace std; int main () { int N, Q; cin >> N >> Q; set st; st.insert(1000); for (int i = 1; i <= N; i ++) { int a; cin >> a; if (a > 1) { st.insert(-i); } } for (int q = 0;q < Q; q ++) { int t, x, y; cin >> t >> x >> y; if (t == 1) { if (y > 1) { st.insert(-x); } else if (st.find(-x) != st.end()) { st.erase(-x); } } else { int pk = -(*st.lower_bound(-y)); int d = min(y - x, y - pk); cout << (d % 2 ? "S" : "F") << endl; } } }