import java.util.*;
class Palindrome{
public static void main (){
String n,rev=””;
int i;
Scanner sc= new Scanner (System.in);
System.out.println(“Enter a word “);
n=sc.nextLine();
int l=n.length();
for(i=l-1;i>=0;i–){
rev=rev+n.charAt(i);
}
if(n.equals(rev))
System.out.println(“It is a palindrome”);
else
System.out.println(“It is not a palindrome”);
}
}