#include <iostream>
#include <string>
using namespace std;

string c1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789";
string c2 = "A   3  HIL JM O   2TUVWXY51SE Z  8 ";

bool is_rpalindrome(string s){
    return equal(s.begin(), s.end(), s.rbegin());
}

bool mirror(string s){
	string s1 = s;
	reverse(s.begin(), s.end());
    for (int i = 0; i < s.length(); i++){
	    s[i] = c2[c1.find(s[i])];
	}
	return (s1 == s);
}

int main(){
    string S, s;
    int count = 0;
    while (getline(cin, S)){
		s = "";
		for (int i = 0; i < S.length(); i++){
		    if (S[i] == '0')
		        s += 'O';
		    else
		        s += S[i];
		}
	    if (mirror(s)){
			if (is_rpalindrome(s))
    			cout << S << " -- is a mirrored palindrome." << endl;
    		else
    		    cout << S << " -- is a mirrored string." << endl;
	    }
	    else{
			if (is_rpalindrome(s))
	    	    cout << S << " -- is a regular palindrome." << endl;
	    	else
	    	    cout << S << " -- is not a palindrome." << endl;
		}
		cout << endl;
	}
    return 0;
}
