#include<stdio.h> #include<string.h> int main() { char str[22]; int i, l; int mirrored, palindrome; while (scanf("%s", str) != EOF) { for (i = 0, l=strlen(str)-1, mirrored = palindrome = 1; i <= l; i++, l--) { switch (str[i]) { case 'A' : if (str[l] != 'A') mirrored = 0; break; case 'E' : if (str[l] != '3') mirrored = 0; break; case 'H' : if (str[l] != 'H') mirrored = 0; break; case 'I' : if (str[l] != 'I') mirrored = 0; break; case 'J' : if (str[l] != 'L') mirrored = 0; break; case 'L' : if (str[l] != 'J') mirrored = 0; break; case 'M' : if (str[l] != 'M') mirrored = 0; break; case 'O' : if (str[l] != 'O') mirrored = 0; break; case 'S' : if (str[l] != '2') mirrored = 0; break; case 'T' : if (str[l] != 'T') mirrored = 0; break; case 'U' : if (str[l] != 'U') mirrored = 0; break; case 'V' : if (str[l] != 'V') mirrored = 0; break; case 'W' : if (str[l] != 'W') mirrored = 0; break; case 'X' : if (str[l] != 'X') mirrored = 0; break; case 'Y' : if (str[l] != 'Y') mirrored = 0; break; case 'Z' : if (str[l] != '5') mirrored = 0; break; case '1' : if (str[l] != '1') mirrored = 0; break; case '2' : if (str[l] != 'S') mirrored = 0; break; case '3' : if (str[l] != 'E') mirrored = 0; break; case '5' : if (str[l] != 'Z') mirrored = 0; break; case '8' : if (str[l] != '8') mirrored = 0; break; default : mirrored = 0; break; } if (palindrome && str[i] != str[l]) palindrome = 0; } if (palindrome) if (mirrored) printf("%s -- is a mirrored palindrome.\n\n", str); else printf("%s -- is a regular palindrome.\n\n", str); else if (mirrored) printf("%s -- is a mirrored string.\n\n", str); else printf("%s -- is not a palindrome.\n\n", str); } return 0; }