This page is still under construction.

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

Use Every Letter

Interview

Time limit2sMemory limit256 MB

Summary
Decide for each of up to 50 sentences whether it contains every letter a to z, and list the missing letters otherwise.
Level

Easy1 of 10

Topics
String, Array
Solved
No attempts yet

Problem

A pangram is a sentence that uses all 26 letters a to z at least once each. The best known example is "The quick brown fox jumps over the lazy dog."

Kkung wants to know whether any other sentence is a pangram. Read several sentences and decide for each one whether it is a pangram.

Letter case does not matter when you check for a pangram.

Input

The first line contains the number of sentences NN. (1≤N≤501 \le N \le 50)

Each of the next NN lines contains one sentence. A sentence may contain uppercase and lowercase letters, spaces, digits, and the punctuation marks . , ? ! ' ".

Each sentence is between 1 and 100 characters long.

Output

Print one line for each sentence.

If the sentence is a pangram, print pangram.

Otherwise print missing, then a single space, then every letter that does not appear in the sentence. Print those letters in lowercase, sorted alphabetically, with no spaces between them.

Examples6

  1. Example 1

    Input
    3
    The quick brown fox jumps over the lazy dog.
    ZYXW, vu TSR Ponm lkj ihgfd CBA.
    .,?!'" 92384 abcde FGHIJ
    
    Expected output
    pangram
    missing eq
    missing klmnopqrstuvwxyz
    
  2. Example 2

    Input
    1
    a
    
    Expected output
    missing bcdefghijklmnopqrstuvwxyz
    
  3. Example 3

    Input
    1
    abcdefghijklmnopqrstuvwxyz
    
    Expected output
    pangram
    
  4. Example 4

    Input
    1
    THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG!
    
    Expected output
    pangram
    
  5. Example 5

    Input
    1
    .,?!'" 0123456789
    
    Expected output
    missing abcdefghijklmnopqrstuvwxyz
    
  6. Example 6

    Input
    4
    Pack my box with five dozen liquor jugs.
    Jackdaws love my big sphinx of quartz
    How vexingly quick daft zebras jump
    Sphinx of black quartz, judge my vow?
    
    Expected output
    pangram
    pangram
    pangram
    pangram