working palindrome program