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