P
R
O
G
R
A
M
M
I
N
G
 
C
O
M
P
E
T
I
T
I
O
N
 

Anagram

Task #4
Novice
4 Points

Task Description
An anagram is a word or phrase obtained by rearranging the letters of another word or phrase. For example “Neo” is an anagram of “One”, “schedule” is an anagram of “held cues”, and “never diets” is an anagram of “desert vine”. Write a program which can determine if two strings are anagrams.

Program Input
The input file consists of pairs of strings delimited by double-quote marks. The first line of the file specifies the number of string pairs. You may assume each string is no longer than 80 characters.

5
"one" "neo"
"sacred cow" "code wars"
"A stitch in time saves nine." "Is this meant as incentive?"
"cow adviser" "code wars iv"
"dormitory" "dirty room"

Program Output
The program must write each pair of strings to the output file and indicate if they are anagrams. Ignore punctuation, digits, and all other non-letters. Ignore the case of letters (as in the examples above). The program must write:
          "string1" is an anagram of "string2"
if they are anagrams, or
          "string1" is NOT an anagram of "string2"
otherwise.

"one" is an anagram of "neo"
"sacred cow" is NOT an anagram of "code wars"
"A stitch in time saves nine." is an anagram of "Is this meant as incentive?"
"cow adviser" is an anagram of "code wars iv"
"dormitory" is an anagram of "dirty room"