input: from typing import List
  from itertools import pairwise
  def process_queries(queries: List[List[int]]) -> List[bool]:
      """
      Consider an endless number line with its origin at 0 and extending towards the positive x-axis.
  
      You are provided with a 2D array called queries consisting of two types of questions:
  
      1.For a query of type 1, queries[i] = [1, x]. Place an obstacle at distance x from the origin. It is assured that there is no obstacle at distance x when the query is made.
      2.For a query of type 2, queries[i] = [2, x, sz]. Determine if it is feasible to insert a block of size sz anywhere within the range [0, x] on the line, ensuring that the block fully resides within [0, x]. A block cannot overlap with any obstacle, although it may touch it. Note that you do not actually position the block. Queries are independent.
      Return a boolean list results, where results[i] is true if you can place the block specified in the ith query of type 2, and false otherwise.
  
      Examples:
      >>> queries = [[1,2],[2,3,3],[2,3,1],[2,2,2]]
      [false,true,true]
      >>> queries = [[1,7],[2,7,6],[1,2],[2,7,5],[2,7,6]]
      [true,true,false]
  
      Conditions:
      1 <= queries.length <= 15 * 10^4
      2 <= queries[i].length <= 3
      1 <= queries[i][0] <= 2
      1 <= x, sz <= min(5 * 10^4, 3 * queries.length)
      The input is structured such that for queries of type 1, no obstacle is present at distance x when the query is made.
      The input is structured such that there is at least one query of type 2.
      """
output:     obstacles = set()
      results = []
  
      def can_place_block(x, sz):
          if sz > x:
              return False
          prev_obstacle = -1
          for obstacle in sorted(obstacles):
              if obstacle > x:
                  break
              if obstacle - prev_obstacle - 1 >= sz:
                  return True
              prev_obstacle = obstacle
          return x - prev_obstacle >= sz
  
      for query in queries:
          if query[0] == 1:
              obstacles.add(query[1])
          elif query[0] == 2:
              x, sz = query[1], query[2]
              results.append(can_place_block(x, sz))
              
      return results