A palindrome is a string of letters that when read either forward or backwards yields the same result. An example of a palindrome is:
Go ... dog!
Write a program that will test if a string is a palindrome. Note: for this problem, any characters outside of the range a-z and A-Z can be ignored. In addition, all characters should be converted to lower case letters for comparison. The input file consists of strings, one per line. The last line of the file contains the string EOF. This file is called palin.in. The output file, palin.out, should contain the string, one of the two messages:
Sample input:
Madam, I'm Adam.
race car.
Hello to you.
EOF

Sample output:
Madam, I'm Adam. is a palindrome.
race car. is a palindrome.
Hello to you. is NOT a palindrome.

This problem is from the 2001 PACISE contest, hosted by Edinboro University.