Lazy Palindrome

0

0 votes
jlong21
Problem

As we all know Ashish(GOOGLE OP) is lazy as hell. He always try to cut short his tasks, this time he was given a task from Mufi(GOOGLE OP) to change a given string to a palindrome(because that's what programmers do) in minimum number of moves. Here he negotiated with Mufi that he will only try to change at most 1 character to make the pallindrome. As Mufi knew this makes the task almost negligible compared to before he said, ignore the case of the alphabet while checking for pallindrome and asked him to say if the pallindrome can be made(on which Ashish agreed on readily). And even that wasn't enough he gave his task to you guys for solving.

Input

The first line contains the integer t , the number of cases
The next n lines have the strings to be checked, one on each line.

Output

On t lines, print an YES if the string can be changed to a palindrome or already is a palindrome, print NO otherwise.

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?