1. #Dimikoj Accept

  2. T = int(input())
  3. for i in range(T):
  4. S = input()
  5. R = S[::-1]
  6. if S == R:
  7. print("Yes! It is Palindrome!")
  8. else:
  9. print("Sorry! It is not Palindrome!")