Solution for HackerMeter Basics: Palindrome Perception question