Created palindrome class and started iterative method