n, q = map(int, input().split()) assert(1 <= n <= 2 * 10 ** 5 and 1 <= q <= 2 * 10 ** 5) s = list(input()) assert(len(set(s) | {"(", ")"}) == 2) s2 = set() for _ in range(q): t, *Q = map(int, input().split()) s2.add(t) if t == 1: i = Q[0] assert(1 <= i <= n) elif t == 2: l, r = Q assert(1 <= l <= r <= n) else: assert(False) assert(2 in s2)