#include using namespace std; int n,q,t,x,y; int main(){ cin>>n>>q; set A; A.insert(-1); for(;n>y;y++){ cin>>x; if(--x)A.insert(y); } while(q--){ cin>>t>>x>>y; if(--t){ auto z=--A.lower_bound(y); if(*z>x-2)cout << "SF"[(y-*z)%2] << endl; else cout << "FS"[(y-x)%2] << endl; }else{ A.insert(--x); if(--y)A.erase(x); } } }