1997 Woburn Computer Programming Challenge

4. Typing

INPUT FILE: prob4.in
OUTPUT FILE: prob4.out

With the introduction of computers in today's life, typing skills are essential for all. As a result, one of the typing teahcers has a booming business. Yesterday, however, she made the mistake of specifying the following test for her students: "Type lines of 26 characters each, such that each letter of the alphabet occurs only once."

Now that she sits at home and wants to mark the tests, she discovered that instead of typing the alphabet in order, most took the liberty to type a permutation (re-ordering) of the alphabet.

What she would like you to do is write a program which marks the tests for her, meaning that you have to check for each line of characters whether it is correct, i.e. whether it is really a permutation of the 26 lowercase letters of the alphabet.

INPUT
The first line of input contains an integer N specifying the number of test cases.
Each test case is one line of test, no longer than 80 characters.

OUTPUT
For each test case, you should create a single line of output. The output should read "OK." if the input is exactly a permutation of the 26 lowercase letters of the alphabet, and "Nope." if it is not.

Sample Input File

4
abcdefghijklmnopqrstuvwxyz
zyxwvutsrqponm and so on
thequickbrownfxjmpsvlazydg
And now, for something completely different.

Output for Sample Input

OK.
Nope.
OK.
Nope.
Downloader failed! Response object 006~ASP 0159~Buffering Off~Buffering must be on.