Rulers of Centauri Prime

Given T country names, report for each whether a king, a queen, or nobody rules it from its last letter.

Easy1StringImplementationNo attempts yetTime limit5sMemory limit512 MB

Problem

Before the mighty Centauri Republic was founded, the planet Centauri Prime was split into several independent kingdoms. The kingdom of Mollaristan was ruled by king Loatold, and the kingdom of Auritania was ruled by queen Elana. In fact, every kingdom whose name ended in a consonant was ruled by a king, and every kingdom whose name ended in a vowel was ruled by a queen. By another coincidence, every kingdom whose name ended in the letter y was in constant turmoil and was ruled by nobody.

So the last letter of the name decides everything: y means nobody rules, one of the vowels a, e, i, o, u means a queen rules, and any other consonant means a king rules. Given several country names, write a program that reports the current ruler of each country.

Input

The first line contains the number of test cases TT. Each of the next TT lines contains the name of one country. Country names consist of English letters only, with a capital first letter and lower case letters after it. No line contains any other character, and there are no empty lines.

Output

For each test case, print one line in the format Case #x: C is ruled by Y., where xx is the case number starting from 1, CC is the country name from the input, and YY is one of a king, a queen or nobody.

Capitalization and the terminating period must match this format exactly.

Constraints

  • 1T3001 \le T \le 300
  • Each country name has between 3 and 20 letters.