One of the listeners of the NPR Sunday Puzzle show described the following puzzle: The word "wizard" has the peculiar property that its letters can be grouped in pairs,
that are opposite each other in the alphabet. That is, A and Z are at opposite ends of the alphabet, C and X are three letters in from their respective ends, and M and N are 13 letters in from their respective ends. Can you name a well-known brand name in six letters that has this same property? Answer: La-Z-Boy (Notice the alphabetic opposites don't have to appear in opposite positions in the word)
Given a list of words you must determine which of the words are “opposite” words. Note that capitalization is not important when determining is a word is an “opposite” word.
The first line of input will be a positive integer, n, indicating the number of problem sets that follow. Following the positive integer will be n text strings, one per line.
For each problem set print “Yes” if the string is an “opposite” word and “No” if it is not an “opposite” word.
5 Wizard Mark La-Z-Boy Love Hello
Yes No Yes Yes No