AT_abc419_b [ABC419B] Get Min

Description

There is an empty bag. You are given $ Q $ queries. Process these queries in order and output the answer to each type- $ 2 $ query. Each query is of one of the following types. - Type $ 1 $ : Given as input in the format `1 x`. Put a ball with the integer $ x $ written on it into the bag. - Type $ 2 $ : Given as input in the format `2`. Pick out one ball with the minimum integer written on it from the balls in the bag, and report that integer as the answer. This query is not given when the bag contains no balls.

Input Format

The input is given from Standard Input in the following format: > $ Q $ $ \text{query}_1 $ $ \text{query}_2 $ $ \ldots $ $ \text{query}_Q $ Here, $ \text{query}_i $ is the $ i $ -th query and is given in one of the following formats: > $ 1 $ $ x $ > $ 2 $

Output Format

Let $ q $ be the number of type- $ 2 $ queries, and output $ q $ lines. The $ i $ -th line should contain the answer to the $ i $ -th type- $ 2 $ query.

Explanation/Hint

### Sample Explanation 1 Initially, the bag contains no balls. The 1st query puts a ball with $ 6 $ written on it into the bag. The 2nd query puts a ball with $ 7 $ written on it into the bag. In the 3rd query, the bag contains a ball with $ 6 $ written on it and a ball with $ 7 $ written on it, so you pick out the ball with $ 6 $ written on it. The answer to this query is $ 6 $ . The 4th query puts a ball with $ 1 $ written on it into the bag. In the 5th query, the bag contains a ball with $ 1 $ written on it and a ball with $ 7 $ written on it, so you pick out the ball with $ 1 $ written on it. The answer to this query is $ 1 $ . ### Sample Explanation 2 The bag may contain multiple balls with the same integer. ### Constraints - $ 2 \leq Q \leq 100 $ - In a type- $ 1 $ query, $ 1 \leq x \leq 100 $ . - When a type- $ 2 $ query is given, the bag is not empty. - At least one type- $ 2 $ query is given. - All input values are integers.