solution to 4 - palindromes