n,q=list(map(int,input().split())) a=[1 if i=='1' else 0 for i in input()] for _ in range(q): t,x,y=list(map(int,input().split())) if t==1: if y==1: a[x-1]=1 else: a[x-1]=0 elif 0 in a[0:y-1]: if a[0:y-1:-1].index(0)%2==0: print("F") else: print("S") else: if y%2==1: print ("F") else: print("S")