Code to check if strings are palindromes.