Amagi Brilliant Contests runs a business making and hosting contests on its online platform to competitive programmers who want to run their own contests.
On the last contest they hosted, there were simply not enough staff members to staff all of the judging servers. For the next time around, the management decided to enslave hire more personnel. But prospective employees come with all levels of management and technical know-how. Particularly, every employee has a potentially non-unique skill level
Since the management wishes to minimize the cost of potential mistakes, they've decided to pair each new employee with a veteran employee so that they can be shown the ropes. There are
Each new employee has an adaptability factor
Being the head of the human resources department at Amagi Brilliant Contests, you've been tasked with pairing each new employee with an existing employee.
Input Specification
The first line of input will have
Each of the next
Line
Each of the next
Output Specification
The name of the employee they should be paired with, or No suitable teacher!
if none exists.
Sample Input 1
5
Kanie 1000
Moffle 800
Sento 950
Macaron 550
Tirami 500
3
930 20
400 150
790 15
Sample Output 1
Sento
Tirami
Moffle
Sample Input 2
4
Muse 203
Sylphy 202
Koboli 202
Salama 999
2
200 1
200 3
Sample Output 2
No suitable teacher!
Sylphy
Comments