PROGRAMMING:Line up in the service hall
In the comprehensive office hall of Zhengzhou University, many people come to work in line every day. Now, can you write a program to help teachers understand the current business situation.
**Please learn the list related content in C + + STL and practice programming**
###Input format:
The first line is a number n, which indicates the number of queuing information or query information items.
In the following N lines, the content of each line has the following three situations
(1) In name means that the person named name is new to the office hall and is at the end of the line( There is a space between in and name. Name is the string corresponding to the name, and the length is no more than 10).
(2) Out means that the person at the top of the current row has finished the business and left.
(3) Q means a query, please output the person who is currently handling business, that is, the first person in the team. If there is no one to handle the business, the output will be "null", excluding quotation marks.
###Output format:
According to the above information, each time you encounter a query, the corresponding line will be output. If there are people in the team, the name of the first person will be output, otherwise null will be output.
###Input example:
```in
five
in A
out
q
in B
q
```
###Output example:
The corresponding output is given here. For example:
```out
NULL
B
```
answer:If there is no answer, please comment
**Please learn the list related content in C + + STL and practice programming**
###Input format:
The first line is a number n, which indicates the number of queuing information or query information items.
In the following N lines, the content of each line has the following three situations
(1) In name means that the person named name is new to the office hall and is at the end of the line( There is a space between in and name. Name is the string corresponding to the name, and the length is no more than 10).
(2) Out means that the person at the top of the current row has finished the business and left.
(3) Q means a query, please output the person who is currently handling business, that is, the first person in the team. If there is no one to handle the business, the output will be "null", excluding quotation marks.
###Output format:
According to the above information, each time you encounter a query, the corresponding line will be output. If there are people in the team, the name of the first person will be output, otherwise null will be output.
###Input example:
```in
five
in A
out
q
in B
q
```
###Output example:
The corresponding output is given here. For example:
```out
NULL
B
```
answer:If there is no answer, please comment