Types: n: int, q: int, t: int, x: int, query: List[Tuple[int, int, Optional[int]]]
Ranges: 1 ≤ n ≤ 1,000, 1 ≤ q ≤ 200,000, -1,000,000,000 ≤ x ≤ 1,000,000,000
Addtl Info: query_i is a tuple where the first element is 0, 1, or 2, with the second element t (0 ≤ t < n), and the third element x present only if the first element is 0