Everyone knows about the popular coding website " codeforces.com ". It is a rating based programming website, where thousands of programmers around the world participate in contest and achieve their desired programming ratings. Codeforces rating calculations is very complicated. Right now we will skip it and we will talk about LU Contestants Codeforces rating.
In this problem you are given codeforces handle name of LU Contestants and their ratings. You need to determine who has the highest rating and his/her skill name.
Rating: Skill Name:
1600-1899 Expert
1400-1599 Specialist
1200-1399 Pupil
1-1199 Newbie
Input:
The first line of the input file contains the number of test cases, T ( 1 <= T <= 100 ). Then T test cases follow. The first line of each test case contains one integer, N the number of contestants. Then the next N lines contains one String and one Integer. Where string is the "Handle Name" and integer is the "Rating" of each contestants.
Constraints
T ( 1 <= T <= 100 ).
N ( 1 <= N <= 100 ).
Rating ( 1 <= Rating <= 1899 ).
Output:
For each of the test cases you need to print one line of output. The output for each test case starts with the serial number of the test case, then print the handle name of the one who has the highest rating along with his/her skill name. If there are two or more handle with highest rating, print the one based on lexicographically sorted order.
( Please Check Sample Input/Output For Details. )
Input | Output |
---|---|
2 4 DarkknightRHZ 1479 AnikaTahsin 1074 CLown1331 1700 the_badcoder 1506 4 sayedalmahdi 1208 Fake_Death 1411 mohammadjamil994 1360 ayesha_1239 1159 | Case 1: CLown1331 is Expert!. Case 2: Fake_Death is Specialist!. |