#include <stdio.h>
#include <string.h>
#define N 50
int main()
{
    char array[N] = {0};
	char front;
	char end;
	char x;
	char w=0;
	char i;
	char forward[N];
	char reverse[N];

	printf("Enter Message: ");
	gets(array);

	front = strlen(array);
	end = strlen(array) - 1; 
	for( i = 0; i <= front; i++)
	{      
		forward[i]= array[i];

	} 
	for( i=0,x = end; x >= 0; i++,x--)
	{
		reverse[i]= array[x];
	}
	reverse[i]=0;
	if (strcmp(forward,reverse)!=0)
	{
		w ='1';
	}

	if(w == '1')
	{
		printf("Not a Palindrome");
	} 
	else{
		printf("Palindrome");
	}

	printf("\n");
	return 0;
}