#include<stdio.h>
#include<string.h>
char jx[]={"A 3 HIL JM O 2TUVWXY51SE Z 8 "};
char j[]={"ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"};
const char* meg[]={"is not a palindrome","is a regular palindrome","is a mirrored palindrome","is a mirrored string"};
bool huwen(char*p,int n){
for(int i=0;i<n/2;i++)if(p[i]!=p[n-i-1])return 0;
return 1;
}
int chr(char *p,char ch){
for(int i=0;i<strlen(p);i++)if(p[i]==ch)return i;
}
bool jxs(char *p,int n){
for(int i=0;i<n/2;i++){
int m=chr(j,p[i]);
if(jx[m]!=p[n-1-i])return 0;
}
return 1;
}
int main(){
char s[100];
while(~scanf("%s",s)){
int n;
int i=(n=huwen(s,strlen(s)))+jxs(s,strlen(s));
if(i==1)printf("%s -- %s",s,n?meg[1]:meg[3]);
else printf("%s -- %s",s,meg[i]);
putchar('.');putchar('\n');
}
return 0;
}
#include<string.h>
char jx[]={"A 3 HIL JM O 2TUVWXY51SE Z 8 "};
char j[]={"ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"};
const char* meg[]={"is not a palindrome","is a regular palindrome","is a mirrored palindrome","is a mirrored string"};
bool huwen(char*p,int n){
for(int i=0;i<n/2;i++)if(p[i]!=p[n-i-1])return 0;
return 1;
}
int chr(char *p,char ch){
for(int i=0;i<strlen(p);i++)if(p[i]==ch)return i;
}
bool jxs(char *p,int n){
for(int i=0;i<n/2;i++){
int m=chr(j,p[i]);
if(jx[m]!=p[n-1-i])return 0;
}
return 1;
}
int main(){
char s[100];
while(~scanf("%s",s)){
int n;
int i=(n=huwen(s,strlen(s)))+jxs(s,strlen(s));
if(i==1)printf("%s -- %s",s,n?meg[1]:meg[3]);
else printf("%s -- %s",s,meg[i]);
putchar('.');putchar('\n');
}
return 0;
}