Marsh interview question

Write code on Palindrome series.