B=448 st1=[0]*B*B st2=[0]*B n,Q=map(int,input().split()) a=list(map(int,input().split())) for i in range(n): st1[i]=a[i] for i in range(B): st2[i]=max(st1[i*B:i*B+B]) for _ in range(Q): t,x,y=map(int,input().split()) if t==1: x-=1 st1[x]=y i=x//B st2[i]=max(st1[i*B:i*B+B]) if t==2: x-=1 y-=1 ok=0 ng=y-x+1+1 while ng-ok>1: m=(ok+ng)//2 a=0 l=y-m+1 r=y yl=l//B yr=r//B if yl==yr: a=max([a]+st1[l:r+1]) else: a=max([a]+st1[l:yl*B+B]) a=max([a]+st2[yl+1:yr]) a=max([a]+st1[yr*B:r+1]) if a==1: ok=m else: ng=m print("FS"[ok%2])