#include <iostream>
#include <string>
#include <map>
    using namespace std;
    
map<char, char> tbl;   // make it global
    
bool all_mirror(string s){
  for (int i = 0; i < s.length(); ++i)
     if (tbl.find(s[i]) == tbl.end())
        return false;
     else if (tbl[s[i]] != s[i])
        return false;
  return true;
}   

bool mirror(string s){
     for (int i = 0; i < s.length(); ++i)
        if (tbl.find(s[i]) == tbl.end())
          return false;
        else if (tbl[s[i]] != s[s.length() - i - 1])
           return false;
     return true;
}            

int main(){

/*    tbl['A'] = 'A';
    tbl['E'] = '3';
    tbl['3'] = 'E';
    tbl['H'] = 'H';
    tbl['I'] = 'I';
*/    
    char dom[]="ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789";
    char mir[]="A   3  HIL JM O   2TUVWXY51SE Z  8 ";
    
    for (int i = 0; i < sizeof(mir)/sizeof(mir[0]); ++i)
      if (mir[i] != ' ')
         tbl[dom[i]] = mir[i];
         
    string line;
    while (getline(cin, line)){
          // check if line is .....
    
      bool is_pal = equal(line.begin(), line.end(), line.rbegin());
      if (is_pal){
             if (all_mirror(line))
                cout << line << " is a mirrored palindrome." << endl;
             else
                cout << line << " is a regular palindrome." << endl;
      } else {
          if (mirror(line))
             cout << line << " is a mirrored string." << endl;
           else
             cout << line << " is not a palindrome." << endl;
       }                      
                    
          
    }          
}
