Recursive checking if the word is a palindrome