F. Por Costel and the Alien Invasion
time limit per test
2 seconds
memory limit per test
64 megabytes
input
invazia.in
output
invazia.out

Extraterrestrials are invading Earth! Happily, we have someone to protect us: the squealing hero of humanity, Por Costel the pig! He has a brilliant plan which employs tinfoil and a lot of staplers, but he also needs your help.

The alien invasion takes place in multiple steps. It is concentrated on a -kilometer long area (the kilometers are numbered through from left to right). The invasion consists of events of the following type:

1) An extraterrestrial ship enters the atmosphere and stops at distance from the ground, spanning from kilometer to kilometer (inclusive).

2) The last extraterrestrial ship that entered the atmosphere (from the ones that are still present) leaves.

All that Por Costel needs from you is to build him a radar. He needs the radar to tell him at certain points in time the height of the alien ship that is closest to the ground directly above kilometer .

Input

The input file invazia.in will contain on the first line integers () and (), the number of kilometers and the number of events respectively.

Next come lines that each describe an event:

  • character 'I' followed by three integers () - a new ship appears
  • character 'E' - the last ship disappears
  • character 'R' - followed by an integer number () - a radar query

It is guaranteed that for any 'E' operation there exists at least one alien ship in the atmosphere.

Output

In the output file invazia.out you should print lines which contain the answers for each of Por Costel's radar queries ( is equal to the number of radar queries). In the case that there is no ship above kilometer , you should print the message "GUITZZZ!" (without the quotes).

Example
Input
12 6
I 1 7 10
R 3
I 1 12 1
E
I 5 12 2
R 7
Output
10
2