I Can Guess the Data Structure!#2055

I Can Guess the Data Structure!

1 second
64 megabytes
Very easy

There is a bag-like data structure that supports two operations.

You are given a sequence of operations and returned values. You need to guess the data structure. It may be a stack (Last-In, First-Out), a queue (First-In, First-Out), a priority queue (removes largest elements first), or something else!

Input

There are several test cases. Each test case starts with a single integer (1 \leq n \leq 1000). Each of the next lines is either a type- command, or a type- command followed by an integer . This means that after executing a type- command, you obtain the element without error. The value is always a positive integer not greater than . The input is terminated by end-of-file (EOF). The input file size does not exceed MB.

Output

For each test case, output one of the following:

Examples

Example 1

Loading
Loading