#include<iostream>
#include<cstring>
using namespace std;
int is_Palindrome(char *A)
{
int len = strlen(A);
for(int i = 0; i < len; i++)
if(A[i] != A[len-1-i]) return 0;
return 1;
}
int is_Mirroied(char *A)
{
int len = strlen(A);
char B[25];
for(int i = 0; i < len; i++)
{
if(A[i]!='E' && A[i]!='3' && A[i]!='J' && A[i]!='L' && A[i]!='S' && A[i]!='2' && A[i]!='Z' && A[i]!='5' && A[i]!='A'&& A[i]!='H' && A[i]!='I' && A[i]!='M' && A[i]!='O' && A[i]!='T' && A[i]!='U' && A[i]!='V' &&A[i]!='W' && A[i]!='X' && A[i]!='Y' && A[i]!='1' && A[i]!='8')
return 0;
else
{
if(A[i]=='E') B[i] = '3';
else if(A[i]=='J') B[i] = 'L';
else if(A[i]=='L') B[i] = 'J';
else if(A[i]=='S') B[i] = '2';
else if(A[i]=='Z') B[i] = '5';
else if(A[i]=='2') B[i] = 'S';
else if(A[i]=='3') B[i] = 'E';
else if(A[i]=='5') B[i] = 'Z';
else if(A[i]=='A') B[i] = 'A';
else if(A[i]=='H') B[i] = 'H';
else if(A[i]=='I') B[i] = 'I';
else if(A[i]=='M') B[i] = 'M';
else if(A[i]=='O') B[i] = 'O';
else if(A[i]=='T') B[i] = 'T';
else if(A[i]=='U') B[i] = 'U';
else if(A[i]=='V') B[i] = 'V';
else if(A[i]=='W') B[i] = 'W';
else if(A[i]=='X') B[i] = 'X';
else if(A[i]=='Y') B[i] = 'Y';
else if(A[i]=='1') B[i] = '1';
else if(A[i]=='8') B[i] = '8';
}
}
for(int i = 0; i < len; i++)
if(A[i] != B[len-1-i]) return 0;
return 1;
}
int main()
{
char A[25];
while(cin>>A)
{
if(is_Palindrome(A)==0&&is_Mirroied(A)==0)
{
cout<<A<<" -- is not a palindrome."<<endl;
cout<<endl;
}
if(is_Palindrome(A)==1&&is_Mirroied(A)==0)
{
cout<<A<<" -- is a regular palindrome."<<endl;
cout<<endl;
}
if(is_Palindrome(A)==0&&is_Mirroied(A)==1)
{
cout<<A<<" -- is a mirrored string."<<endl;
cout<<endl;
}
if(is_Palindrome(A)==1&&is_Mirroied(A)==1)
{
cout<<A<<" -- is a mirrored palindrome."<<endl;
cout<<endl;
}
}
return 0;
}
#include<cstring>
using namespace std;
int is_Palindrome(char *A)
{
int len = strlen(A);
for(int i = 0; i < len; i++)
if(A[i] != A[len-1-i]) return 0;
return 1;
}
int is_Mirroied(char *A)
{
int len = strlen(A);
char B[25];
for(int i = 0; i < len; i++)
{
if(A[i]!='E' && A[i]!='3' && A[i]!='J' && A[i]!='L' && A[i]!='S' && A[i]!='2' && A[i]!='Z' && A[i]!='5' && A[i]!='A'&& A[i]!='H' && A[i]!='I' && A[i]!='M' && A[i]!='O' && A[i]!='T' && A[i]!='U' && A[i]!='V' &&A[i]!='W' && A[i]!='X' && A[i]!='Y' && A[i]!='1' && A[i]!='8')
return 0;
else
{
if(A[i]=='E') B[i] = '3';
else if(A[i]=='J') B[i] = 'L';
else if(A[i]=='L') B[i] = 'J';
else if(A[i]=='S') B[i] = '2';
else if(A[i]=='Z') B[i] = '5';
else if(A[i]=='2') B[i] = 'S';
else if(A[i]=='3') B[i] = 'E';
else if(A[i]=='5') B[i] = 'Z';
else if(A[i]=='A') B[i] = 'A';
else if(A[i]=='H') B[i] = 'H';
else if(A[i]=='I') B[i] = 'I';
else if(A[i]=='M') B[i] = 'M';
else if(A[i]=='O') B[i] = 'O';
else if(A[i]=='T') B[i] = 'T';
else if(A[i]=='U') B[i] = 'U';
else if(A[i]=='V') B[i] = 'V';
else if(A[i]=='W') B[i] = 'W';
else if(A[i]=='X') B[i] = 'X';
else if(A[i]=='Y') B[i] = 'Y';
else if(A[i]=='1') B[i] = '1';
else if(A[i]=='8') B[i] = '8';
}
}
for(int i = 0; i < len; i++)
if(A[i] != B[len-1-i]) return 0;
return 1;
}
int main()
{
char A[25];
while(cin>>A)
{
if(is_Palindrome(A)==0&&is_Mirroied(A)==0)
{
cout<<A<<" -- is not a palindrome."<<endl;
cout<<endl;
}
if(is_Palindrome(A)==1&&is_Mirroied(A)==0)
{
cout<<A<<" -- is a regular palindrome."<<endl;
cout<<endl;
}
if(is_Palindrome(A)==0&&is_Mirroied(A)==1)
{
cout<<A<<" -- is a mirrored string."<<endl;
cout<<endl;
}
if(is_Palindrome(A)==1&&is_Mirroied(A)==1)
{
cout<<A<<" -- is a mirrored palindrome."<<endl;
cout<<endl;
}
}
return 0;
}