|Contests||Virtual Contests||Problems||Submit||Runs Status||Rank List||Forum|
The first line of each test case contain a number M (1 ≤ M ≤ 105) indicating the number of commands.
Each of The following M lines is one command. There are three types of commands:
You can assume all the names is made up of less than 20 letters. All the people have different levels and different names. All the people will join and leave the team at most once.
The input is terminated by a test case starting with M = 0. This test case should not be processed.
Your program should respond to each 'Play' command , output one line containing the two names chosen to fight or "Poor Mr.Yu" if there are less than two members in the team. Please note the one with the higher level will come first. If there are more than one pair whose levels are nearest, you should output the pair with highest level, because people think the fight between higher levels will be more attractive.
You should print a blank line after each test case.
Join WTommy 80
Join RoBa 50
Join Washington 65
Hint: Huge input and output, scanf() and printf() is recommend.