Given a list of operations, check for obstacles in specified intervals based on the operations provided.
Each operation is either ["add", position], which places an obstacle, or ["query", left, right], which asks whether an obstacle currently exists in the inclusive interval [left, right]. Return query results in order. Use the signature def obstacle_queries(operations):.
def obstacle_queries(operations):