Problem: Let's call a string "s-palindrome" if it is symmetric about the middle of the string. For example, the string "oHo" is "s-palindrome", but the string "aa" is not. The string "aa" is not "s-palindrome", because the second half of it is not a mirror reflection of the first half.

<image> English alphabet

You are given a string s. Check if the string is "s-palindrome".

Input

The only line contains the string s (1 ≤ |s| ≤ 1000) which consists of only English letters.

Output

Print "TAK" if the string s is "s-palindrome" and "NIE" otherwise.

Examples

Input

oXoxoXo


Output

TAK


Input

bod


Output

TAK


Input

ER


Output

NIE

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int d = 1, i;
  cin >> str;
  int l = str.length();
  if (l == 1) {
    if (str[0] == 'x' || str[0] == 'o' || str[0] == 'X' || str[0] == 'O' ||
        str[0] == 'v' || str[0] == 'V' || str[0] == 'w' || str[0] == 'W' ||
        str[0] == 'U' || str[0] == 'M' || str[0] == 'I' || str[0] == 'Y' ||
        str[0] == 'T' || str[i] == 'A' || str[i] == 'H') {
      d = 1;
      cout << "TAK" << endl;
    } else {
      d = 0;
      cout << "NIE" << endl;
    }
  } else {
    if (l % 2 == 0) {
      for (i = 0; i < l / 2; i++) {
        if (str[i] == 'o' && str[l - 1 - i] == 'o' ||
            str[i] == 'O' && str[l - 1 - i] == 'O') {
          d = 1;
        } else if (str[i] == 'b' && str[l - 1 - i] == 'd' ||
                   str[l - 1 - i] == 'b' && str[i] == 'd') {
          d = 1;
        } else if (str[i] == 'x' && str[l - 1 - i] == 'x' ||
                   str[i] == 'X' && str[l - 1 - i] == 'X') {
          d = 1;
        } else if (str[i] == 'v' && str[l - 1 - i] == 'v' ||
                   str[i] == 'V' && str[l - 1 - i] == 'V') {
          d = 1;
        } else if (str[i] == 'w' && str[l - 1 - i] == 'w' ||
                   str[i] == 'W' && str[l - 1 - i] == 'W') {
          d = 1;
        } else if (str[i] == 'M' && str[l - 1 - i] == 'M' ||
                   str[l - 1 - i] == 'M' && str[i] == 'M') {
          d = 1;
        } else if (str[i] == 'I' && str[l - 1 - i] == 'I' ||
                   str[l - 1 - i] == 'I' && str[i] == 'I') {
          d = 1;
        } else if (str[i] == 'Y' && str[l - 1 - i] == 'Y' ||
                   str[l - 1 - i] == 'Y' && str[i] == 'Y') {
          d = 1;
        } else if (str[i] == 'T' && str[l - 1 - i] == 'T' ||
                   str[l - 1 - i] == 'T' && str[i] == 'T') {
          d = 1;
        } else if (str[i] == 'U' && str[l - 1 - i] == 'U' ||
                   str[l - 1 - i] == 'U' && str[i] == 'U') {
          d = 1;
        } else if (str[i] == 'p' && str[l - 1 - i] == 'q' ||
                   str[i] == 'q' && str[l - 1 - i] == 'p') {
          d = 1;
        } else if (str[i] == 'A' && str[l - 1 - i] == 'A' ||
                   str[l - 1 - i] == 'A' && str[i] == 'A') {
          d = 1;
        } else if (str[i] == 'H' && str[l - 1 - i] == 'H' ||
                   str[l - 1 - i] == 'H' && str[i] == 'H') {
          d = 1;
        } else {
          d = 0;
          break;
        }
      }
      if (d == 0) {
        cout << "NIE" << endl;
      } else {
        cout << "TAK" << endl;
      }
    } else {
      for (i = 0; i < l / 2; i++) {
        if (str[i] == 'o' && str[l - 1 - i] == 'o' ||
            str[i] == 'O' && str[l - 1 - i] == 'O') {
          d = 1;
        } else if (str[i] == 'b' && str[l - 1 - i] == 'd' ||
                   str[l - 1 - i] == 'b' && str[i] == 'd') {
          d = 1;
        } else if (str[i] == 'x' && str[l - 1 - i] == 'x' ||
                   str[i] == 'X' && str[l - 1 - i] == 'X') {
          d = 1;
        } else if (str[i] == 'v' && str[l - 1 - i] == 'v' ||
                   str[i] == 'V' && str[l - 1 - i] == 'V') {
          d = 1;
        } else if (str[i] == 'w' && str[l - 1 - i] == 'w' ||
                   str[i] == 'W' && str[l - 1 - i] == 'W') {
          d = 1;
        } else if (str[i] == 'M' && str[l - 1 - i] == 'M' ||
                   str[l - 1 - i] == 'M' && str[i] == 'M') {
          d = 1;
        } else if (str[i] == 'I' && str[l - 1 - i] == 'I' ||
                   str[l - 1 - i] == 'I' && str[i] == 'I') {
          d = 1;
        } else if (str[i] == 'Y' && str[l - 1 - i] == 'Y' ||
                   str[l - 1 - i] == 'Y' && str[i] == 'Y') {
          d = 1;
        } else if (str[i] == 'T' && str[l - 1 - i] == 'T' ||
                   str[l - 1 - i] == 'T' && str[i] == 'T') {
          d = 1;
        } else if (str[i] == 'p' && str[l - 1 - i] == 'q' ||
                   str[i] == 'q' && str[l - 1 - i] == 'p') {
          d = 1;
        } else if (str[i] == 'A' && str[l - 1 - i] == 'A' ||
                   str[l - 1 - i] == 'A' && str[i] == 'A') {
          d = 1;
        } else if (str[i] == 'U' && str[l - 1 - i] == 'U' ||
                   str[l - 1 - i] == 'U' && str[i] == 'U') {
          d = 1;
        } else if (str[i] == 'H' && str[l - 1 - i] == 'H' ||
                   str[l - 1 - i] == 'H' && str[i] == 'H') {
          d = 1;
        } else {
          d = 0;
          break;
        }
      }
      if (d == 0) {
        cout << "NIE" << endl;
      } else {
        if (str[i] == 'x' || str[i] == 'o' || str[i] == 'X' || str[i] == 'O' ||
            str[i] == 'v' || str[i] == 'V' || str[i] == 'w' || str[i] == 'W' ||
            str[i] == 'U' || str[i] == 'M' || str[i] == 'I' || str[i] == 'Y' ||
            str[0] == 'T' || str[i] == 'A' || str[i] == 'H') {
          d = 1;
          cout << "TAK" << endl;
        } else {
          d = 0;
          cout << "NIE" << endl;
        }
      }
    }
  }
  return 0;
}