#include <bits/stdc++.h>
using namespace std;
string str = "A 3 HIL JM O 2TUVWXY51SE Z 8 ";
char trainslate(char c){
if(isalpha(c))return str[c-'A'];
else return str[c-'0'+25];
}
int main(){
char s[200];
while(scanf("%s",s)!=EOF){
bool mp=true,p=true;
int len = strlen(s);
for(int i=0;i<len;i++){
if(s[i]=='0')s[i]='O';
if(s[i]!=s[len-1-i])p=false;
if(s[i]!=trainslate(s[len-1-i]))mp=false;
}
if(!p&&!mp) cout<<s<<" -- is not a palindrome."<<endl<<endl;
else if(p&&!mp) cout<<s<<" -- is a regular palindrome."<<endl<<endl;
else if(!p&&mp)cout<<s<<" -- is a mirrored string."<<endl<<endl;
else if(p&&mp)cout<<s<<" -- is a mirrored palindrome."<<endl<<endl;
}
return 0;
}