#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(0)
using namespace std;
int main()
{
FAST;
string t , s ;
while(cin>>t){
bool pal = false , mir = false;
s = t;
int last = t.size()-1;
int len = t.size()-1;
if(t.size() == 1){
pal = true;
if(s[0] == 'A' ) mir = true;
// else if(s[0] == 'E' ) mir = true;
else if(s[0] == 'H' ) mir = true;
else if(s[0] == 'I' ) mir = true;
// else if(s[0] == 'J' ) mir = true;
// else if(s[0] == 'L' ) mir = true;
else if(s[0] == 'M' ) mir = true;
else if(s[0] == 'O' ) mir = true;
// else if(s[0] == 'S' ) mir = true;
else if(s[0] == 'T' ) mir = true;
else if(s[0] == 'U' ) mir = true;
else if(s[0] == 'V' ) mir = true;
else if(s[0] == 'W' ) mir = true;
else if(s[0] == 'X' ) mir = true;
else if(s[0] == 'Y' ) mir = true;
// else if(s[0] == 'Z' ) mir = true;
else if(s[0] == '1' ) mir = true;
// else if(s[0] == '2' ) mir = true;
// else if(s[0] == '3' ) mir = true;
// else if(s[0] == '5' ) mir = true;
else if(s[0] == '8' ) mir = true;
else mir = false;
}
else {
reverse(t.begin() , t.end());
if(s == t) pal = true;
for(int i = 0; i < len ; i++){
if(s[i] == 'A' && s[last] == 'A' ) mir = true;
else if(s[i] == 'E' && s[last] == '3' ) mir = true;
else if(s[i] == 'H' && s[last] == 'H' ) mir = true;
else if(s[i] == 'I' && s[last] == 'I' ) mir = true;
else if(s[i] == 'J' && s[last] == 'L' ) mir = true;
else if(s[i] == 'L' && s[last] == 'J') mir = true;
else if(s[i] == 'M' && s[last] == 'M') mir = true;
else if(s[i] == 'O' && s[last] == 'O' ) mir = true;
else if(s[i] == 'S' && s[last] == '2' ) mir = true;
else if(s[i] == 'T' && s[last] == 'T' ) mir = true;
else if(s[i] == 'U' && s[last] == 'U' ) mir = true;
else if(s[i] == 'V' && s[last] == 'V' ) mir = true;
else if(s[i] == 'W' && s[last] == 'W' ) mir = true;
else if(s[i] == 'X' && s[last] == 'X' ) mir = true;
else if(s[i] == 'Y' && s[last] == 'Y') mir = true;
else if(s[i] == 'Z' && s[last] == '5' ) mir = true;
else if(s[i] == '1' && s[last] == '1' ) mir = true;
else if(s[i] == '2' && s[last] == 'S' ) mir = true;
else if(s[i] == '3' && s[last] == 'E' ) mir = true;
else if(s[i] == '5' && s[last] == 'Z' ) mir = true;
else if(s[i] == '8' && s[last] == '8') mir = true;
else mir = false;
if(mir == false) break;
// if(i == last)break;
last--;
}
}
if(!pal && !mir)cout<<s<<" -- is not a palindrome.\n";
else if(pal && !mir)cout<<s<<" -- is a regular palindrome.\n";
else if(pal && mir)cout<<s<<" -- is a mirrored palindrome.\n";
else if(!pal && mir)cout<<s<<" -- is a mirrored string.\n";
cout<<"\n";
}
return 0;
}
#define FAST ios_base::sync_with_stdio(0)
using namespace std;
int main()
{
FAST;
string t , s ;
while(cin>>t){
bool pal = false , mir = false;
s = t;
int last = t.size()-1;
int len = t.size()-1;
if(t.size() == 1){
pal = true;
if(s[0] == 'A' ) mir = true;
// else if(s[0] == 'E' ) mir = true;
else if(s[0] == 'H' ) mir = true;
else if(s[0] == 'I' ) mir = true;
// else if(s[0] == 'J' ) mir = true;
// else if(s[0] == 'L' ) mir = true;
else if(s[0] == 'M' ) mir = true;
else if(s[0] == 'O' ) mir = true;
// else if(s[0] == 'S' ) mir = true;
else if(s[0] == 'T' ) mir = true;
else if(s[0] == 'U' ) mir = true;
else if(s[0] == 'V' ) mir = true;
else if(s[0] == 'W' ) mir = true;
else if(s[0] == 'X' ) mir = true;
else if(s[0] == 'Y' ) mir = true;
// else if(s[0] == 'Z' ) mir = true;
else if(s[0] == '1' ) mir = true;
// else if(s[0] == '2' ) mir = true;
// else if(s[0] == '3' ) mir = true;
// else if(s[0] == '5' ) mir = true;
else if(s[0] == '8' ) mir = true;
else mir = false;
}
else {
reverse(t.begin() , t.end());
if(s == t) pal = true;
for(int i = 0; i < len ; i++){
if(s[i] == 'A' && s[last] == 'A' ) mir = true;
else if(s[i] == 'E' && s[last] == '3' ) mir = true;
else if(s[i] == 'H' && s[last] == 'H' ) mir = true;
else if(s[i] == 'I' && s[last] == 'I' ) mir = true;
else if(s[i] == 'J' && s[last] == 'L' ) mir = true;
else if(s[i] == 'L' && s[last] == 'J') mir = true;
else if(s[i] == 'M' && s[last] == 'M') mir = true;
else if(s[i] == 'O' && s[last] == 'O' ) mir = true;
else if(s[i] == 'S' && s[last] == '2' ) mir = true;
else if(s[i] == 'T' && s[last] == 'T' ) mir = true;
else if(s[i] == 'U' && s[last] == 'U' ) mir = true;
else if(s[i] == 'V' && s[last] == 'V' ) mir = true;
else if(s[i] == 'W' && s[last] == 'W' ) mir = true;
else if(s[i] == 'X' && s[last] == 'X' ) mir = true;
else if(s[i] == 'Y' && s[last] == 'Y') mir = true;
else if(s[i] == 'Z' && s[last] == '5' ) mir = true;
else if(s[i] == '1' && s[last] == '1' ) mir = true;
else if(s[i] == '2' && s[last] == 'S' ) mir = true;
else if(s[i] == '3' && s[last] == 'E' ) mir = true;
else if(s[i] == '5' && s[last] == 'Z' ) mir = true;
else if(s[i] == '8' && s[last] == '8') mir = true;
else mir = false;
if(mir == false) break;
// if(i == last)break;
last--;
}
}
if(!pal && !mir)cout<<s<<" -- is not a palindrome.\n";
else if(pal && !mir)cout<<s<<" -- is a regular palindrome.\n";
else if(pal && mir)cout<<s<<" -- is a mirrored palindrome.\n";
else if(!pal && mir)cout<<s<<" -- is a mirrored string.\n";
cout<<"\n";
}
return 0;
}