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() {
  char s[1001];
  cin >> s;
  int n = strlen(s);
  int symm[200];
  memset(symm, 0, sizeof(symm));
  symm['A'] = 'A';
  symm['H'] = 'H';
  symm['I'] = 'I';
  symm['M'] = 'M';
  symm['O'] = 'O';
  symm['T'] = 'T';
  symm['U'] = 'U';
  symm['V'] = 'V';
  symm['W'] = 'W';
  symm['X'] = 'X';
  symm['Y'] = 'Y';
  symm['b'] = 'd';
  symm['d'] = 'b';
  symm['o'] = 'o';
  symm['p'] = 'q';
  symm['q'] = 'p';
  symm['v'] = 'v';
  symm['w'] = 'w';
  symm['x'] = 'x';
  int i;
  for (i = 0; i < (n + 1) / 2; i++) {
    if (symm[s[i]] == 0 || symm[s[n - i - 1]] == 0 ||
        symm[s[i]] != s[n - i - 1]) {
      cout << "NIE" << endl;
      break;
    }
  }
  if (i == (n + 1) / 2) cout << "TAK" << endl;
  return 0;
}