Country Leader

For each test case, pick the name with the most distinct letters, breaking ties by lexicographic order where a space sorts before any letter.

Easy2StringSortingImplementationHash mapNo attempts yetTime limit5sMemory limit512 MB

Problem

The constitution of a country says that the leader is the person whose name contains the greatest number of different letters. The country writes names with the uppercase letters A through Z, and a space inside a name does not count as a letter. For example, GOOGLE contains four different letters: E, G, L and O. APAC CODE JAM contains eight. If those two people are the whole country, the leader is APAC CODE JAM.

If several people have the same number of different letters, the leader is the one whose name comes first in alphabetical order. Names are compared character by character, and a space comes before every letter. For example, A AB C and DEF both contain three different letters, and A AB C comes first, so A AB C is the leader.

Given the names of all citizens, find the leader.

Input

The first line contains the number of test cases TT. Each test case begins with a line containing the population NN. The next NN lines each contain the name of one citizen.

Output

For each test case, print one line in the form Case #x: y, where xx is the test case number starting from 1 and yy is the name of the leader.

Constraints

  • 1T1001 \le T \le 100
  • 1N1001 \le N \le 100
  • Each name is at most 20 characters long and consists only of the uppercase letters A through Z and spaces.
  • Every name starts and ends with a letter, so every name contains at least one letter.