from collections import deque import sys import pypyjit import itertools import heapq import math from collections import deque, defaultdict from functools import lru_cache # for AtCoder Easy test if __file__ == 'prog.py': pass else: sys.setrecursionlimit(10 ** 6) pypyjit.set_param('max_unroll_recursion=-1') input = sys.stdin.readline def readints(): return map(int, input().split()) def readlist(): return list(readints()) def readstr(): return input()[:-1] class SegTree: def __init__(self, N, func, e): self.N = N self.func = func self.X = [e] * (N << 1) self.e = e def build(self, seq): for i in range(self.N): self.X[self.N + i] = seq[i] for i in range(self.N)[::-1]: self.X[i] = self.func(self.X[i << 1], self.X[i << 1 | 1]) def add(self, i, x): i += self.N self.X[i] += x while i > 1: i >>= 1 self.X[i] = self.func(self.X[i << 1], self.X[i << 1 | 1]) def update(self, i, x): i += self.N self.X[i] = x while i > 1: i >>= 1 self.X[i] = self.func(self.X[i << 1], self.X[i << 1 | 1]) def query(self, L, R): L += self.N R += self.N vL = self.e vR = self.e while L < R: if L & 1: vL = self.func(vL, self.X[L]) L += 1 if R & 1: R -= 1 vR = self.func(self.X[R], vR) L >>= 1 R >>= 1 return self.func(vL, vR) N, Q = readints() A = readlist() B = [i if A[i] > 1 else -1 for i in range(N)] st = SegTree(N, max, -1) st.build(B) for _ in range(Q): t, x, y = readints() if t == 1: x -= 1 st.update(x, x if y > 1 else -1) else: x -= 1 m = st.query(x, y) if m == -1: print('F' if (y - x) & 1 else 'S') else: print('F' if (y - m) & 1 else 'S')