eolymp
bolt
Try our new interface for solving problems
Problems

A Jaw-dropping Problem

A Jaw-dropping Problem

You all know what a pangram is, so I don't have to tell you that it's a phrase or sentence that uses every letter of the alphabet at least once. You also know what the most famous pangram is, so I won't waste your time reminding you that it's: The quick brown fox jumps over a lazy dog BUT, do you know what a double pangram is? Yes, yes, you're right, it's a phrase or sentence that uses every letter at least twice. And a triple pangram is one that uses every letter at least three times. And a ... well, we could go on, but the practice contest is only one and a half hours so we'll stop here. \InputFile Starts with an integer \textbf{n} indicating the number of cases. Each test case will be a single line containing upper and lower case letters, as well as other non-alphabetic characters such as digits, punctuation and spaces. \OutputFile For each test case, output the case number followed by one of the following phrases: \begin{itemize} \item Not a pangram \item Pangram! \item Double pangram!! \item Triple pangram!!! \end{itemize} Select the phrase that best describes the test case. For example, even though a triple pangram is also a double (and single) pangram, the phrase Triple pangram!!! best describes it. There will be no test cases which use every letter of the alphabet more than three times.
Time limit 1 second
Memory limit 64 MiB
Input example #1
3
The quick brown fox jumps over a lazy dog.
The quick brown fox jumps over a laconic dog.
abcdefghijklmNOPQRSTUVWXYZ-zyxwvutsrqpon 2013/2014 MLKJIHGFEDCBA
Output example #1
Case 1: Pangram!
Case 2: Not a pangram
Case 3: Double pangram!!
Source 2014 North America - East Central Regional Practice Contest, Problem B