#include <iostream>
#include <string>

bool palindrome( const std::string &str );

int main()
{
	std::string input;
	
	while( std::getline( std::cin , input ) )
	{
		if( palindrome( input ) )
			std::cout << input << " is a palindrome." << std::endl;
		else
			std::cout << input << " is NOT a palindrome." << std::endl;
	}
	return 0;
}

bool palindrome( const std::string &str )
{
	bool isPalindrome = true;
	std::string::const_iterator left = str.cbegin() , right = str.cend()-1;
	
	for( ; left < right && isPalindrome; ++left , --right )
	{
		if( *left != *right )
			isPalindrome = false;
	}
	return isPalindrome;
}