Palindrome exercise from project euler