Wrote a program to check palindrom