#include <stdio.h>
#include <string.h>
char mirro1[]="AEHIJLMOOSTUVWXYZ0012358";
char mirro2[]="A3HILJMO02TUVWXY50O1SEZ8";
int pal(char *s)
{
int i,l=strlen(s);
for(i=0;i<=l/2;i++)
{
if(s[i]==s[l-1-i]||(s[i]=='0'&&s[l-i-1]=='O')||(s[i]=='O'&&s[l-i-1]=='0'))
continue;
return 0;
}
return 1;
}
int mir(char *s)
{
int i,j,l=strlen(s);
for(i=0;i<=l/2;i++)
{
for (j = 0; j < 24; j++) {
if(s[i]==mirro1[j])
if(s[l-i-1]==mirro2[j])
break;
}
if(j==24)
return 0;
}
return 1;
}
int main()
{
char s[30];
char arr[]="quanxue";
while(scanf("%s",s)!=EOF)
{
if (pal(s))
if (mir(s))
printf("%s -- is a mirrored palindrome.\n\n",s);
else
printf("%s -- is a regular palindrome.\n\n",s);
else
if (mir(s))
printf("%s -- is a mirrored string.\n\n",s);
else
printf("%s -- is not a palindrome.\n\n",s);
}
return 0;
}