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 s;
  cin >> s;
  if (s.size() == 1) {
    if (s == "A" || s == "I" || s == "M" || s == "H" || s == "O" || s == "T" ||
        s == "U" || s == "V" || s == "Y" || s == "v" || s == "W" || s == "w" ||
        s == "Y" || s == "X" || s == "x" || s == "o")
      cout << "TAK" << endl;
    else
      cout << "NIE" << endl;
    return 0;
  }
  for (int i = 0; i < s.size() / 2; i++) {
    if (s.size() % 2) {
      if (s[s.size() / 2] != 'A' && s[s.size() / 2] != 'o' &&
          s[s.size() / 2] != 'x' && s[s.size() / 2] != 'X' &&
          s[s.size() / 2] != 'U' && s[s.size() / 2] != 'V' &&
          s[s.size() / 2] != 'M' && s[s.size() / 2] != 'O' &&
          s[s.size() / 2] != 'w' && s[s.size() / 2] != 'W' &&
          s[s.size() / 2] != 'T' && s[s.size() / 2] != 'I' &&
          s[s.size() / 2] != 'H' && s[s.size() / 2] != 'Y') {
        cout << "NIE" << endl;
        return 0;
      }
    }
    if (s[i] == 'A' && s[s.size() - (i + 1)] == 'A' ||
        s[i] == 'o' && s[s.size() - (i + 1)] == 'o' ||
        s[i] == 'x' && s[s.size() - (i + 1)] == 'x' ||
        s[i] == 'U' && s[s.size() - (i + 1)] == 'U' ||
        s[i] == 'X' && s[s.size() - (i + 1)] == 'X' ||
        s[i] == 'd' && s[s.size() - (i + 1)] == 'b' ||
        s[i] == 'p' && s[s.size() - (i + 1)] == 'q' ||
        s[i] == 'V' && s[s.size() - (i + 1)] == 'V' ||
        s[i] == 'v' && s[s.size() - (i + 1)] == 'v' ||
        s[i] == 'W' && s[s.size() - (i + 1)] == 'W' ||
        s[i] == 'w' && s[s.size() - (i + 1)] == 'w' ||
        s[i] == 'T' && s[s.size() - (i + 1)] == 'T' ||
        s[i] == 'Y' && s[s.size() - (i + 1)] == 'Y' ||
        s[i] == 'I' && s[s.size() - (i + 1)] == 'I' ||
        s[i] == 'O' && s[s.size() - (i + 1)] == 'O' ||
        s[i] == 'H' && s[s.size() - (i + 1)] == 'H' ||
        s[i] == 'M' && s[s.size() - (i + 1)] == 'M')
      continue;
    if (s[i] == 'b' && s[s.size() - (i + 1)] == 'd' ||
        s[i] == 'q' && s[s.size() - (i + 1)] == 'p')
      continue;
    else {
      cout << "NIE" << endl;
      return 0;
    }
  }
  cout << "TAK" << endl;
  return 0;
}