This page is still under construction.

Parts of this page are still being built. What you see may change.

Pangram Checker

Interview

Time limit3sMemory limit256 MB

Summary
Count how many times each English letter appears in every sentence and print its pangram grade.
Level

Easy2 of 10

Topics
String, Hash map
Solved
No attempts yet

Problem

A pangram uses every English letter at least once. A double pangram uses each letter at least twice, and a triple pangram at least three times. Classify each given sentence.

Input

The first line contains the number of test cases nn. Each of the next nn lines is a sentence with English letters and punctuation.

Output

For each case, print Case i: followed by Not a pangram, Pangram!, Double pangram!!, or Triple pangram!!!. Print only the highest matching grade.

Examples1

  1. Example 1

    Input
    3
    The quick brown fox jumps over a lazy dog.
    The quick brown fox jumps over a laconic dog.
    abcdefghijklmNOPQRSTUVWXYZ-zyxwvutsrqpon   2013/2014      MLKJIHGFEDCBA
    
    Expected output
    Case 1: Pangram!
    Case 2: Not a pangram
    Case 3: Double pangram!!