class Bit: def __init__(self, N): self.size = N self.depth = N.bit_length() self.tree = [0] * (N + 1) def add(self, i, x): while i < self.size: self.tree[i] += x i += i & (-i) def sum0(self, r): s = 0 while r > 0: s += self.tree[r] r -= r & (-r) return s def get_sum(self, l, r): if l <= 1: return self.sum0(r) else: return self.sum0(r) - self.sum0(l - 1) def lower_bound(self, x): s, p = 0, 0 for i in range(self.depth, -1, -1): q = p + (1 << i) if q <= self.size and s + self.tree[q] < x: s += self.tree[q] p += 1 << i return p + 1 N, Q = map(int, input().split()) A = list(map(int, input().split())) bit = Bit(N + 1) for i in range(N): if A[i] > 1: bit.add(i + 1, 1) for i in range(Q): t, x, y = map(int, input().split()) if t == 1: if A[x - 1] == 1 and y > 1: bit.add(x, 1) elif A[x - 1] > 1 and y == 1: bit.add(x, -1) A[x - 1] = y else: if x == y: print('F') else: l = bit.lower_bound(bit.sum0(y)) m = max(l, x) if (y - m) % 2 == 0: print('F') else: print('S')