/*
* 解题思路:
*这道题题意不难理解、就四种情况。搞了一个下午才AC,我用 C 写的 ,为了判断英文字符还是数字字符,用了一个函数isalpha( char c ),
* 这个函数是在#include<cytpe.h>中,不知道为什么那样判断有问题,所以一直过不了,换成通俗的 if() 判断一下就AC了,
*/
#include <stdio.h>
#include <string.h>
#define A 50
int main( )
{
char ss[ A ] = { 'A',' ' ,' ' ,' ' , '3', ' ', ' ', 'H','I','L',' ', 'J','M',' ', 'O', ' ', ' ', ' ', '2', 'T','U','V','W','X','Y','5','1','S','E',' ', 'Z',' ', ' ', '8', ' '};
char str[ 100 ];
int i,j;
int len;
int flag1,flag2,flag3;
while( ~scanf("%s",str) )
{
flag1 = flag2 = 1;
len = strlen( str );
for( i=0,j=len-1; i<=len/2 ; i++,j-- )
{
if( flag1 )
if( str[ i ] != str[ j ] )
flag1 = 0;
if( flag2 )
{
flag3 = 0;
if( str[ i ] >='A' && str[ i ] <='Z' )
flag3 = 1;
if( flag3 == 1 ) flag3 = str[ i ]-'A';
else flag3 = 26 + str[ i ]-'1';
if( str[ j ] != ss[ flag3 ] || ss[ flag3 ] ==' ' )
flag2 = 0;
}
if( !flag1 && !flag2 ) break;
}
if( flag1 && flag2 ) printf("%s -- is a mirrored palindrome.\n\n",str);
else if( flag1 && !flag2 ) printf("%s -- is a regular palindrome.\n\n",str );
else if( !flag1 && flag2 ) printf("%s -- is a mirrored string.\n\n",str);
else if( !flag1 && !flag2 ) printf("%s -- is not a palindrome.\n\n",str);
}
return 0;
}