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;
map<char, char> lis;
map<char, int> sel;
string tar;
int main() {
  lis['M'] = 'M';
  lis['b'] = 'd';
  lis['d'] = 'b';
  lis['O'] = 'O';
  lis['o'] = 'o';
  lis['p'] = 'q';
  lis['q'] = 'p';
  lis['H'] = 'H';
  lis['A'] = 'A';
  lis['I'] = 'I';
  lis['T'] = 'T';
  lis['U'] = 'U';
  lis['V'] = 'V';
  lis['v'] = 'v';
  lis['w'] = 'w';
  lis['W'] = 'W';
  lis['X'] = 'X';
  lis['x'] = 'x';
  lis['Y'] = 'Y';
  sel['A'] = sel['H'] = sel['I'] = sel['M'] = sel['O'] = sel['o'] = sel['T'] =
      sel['U'] = sel['V'] = sel['v'] = sel['W'] = sel['w'] = sel['X'] =
          sel['x'] = sel['Y'] = 233;
  cin >> tar;
  int n = tar.length();
  bool ans = 1;
  if (n % 2 == 1) {
    int l = 0, r = n - 1;
    while (l < r) {
      if (lis[tar[l]] != tar[r] or lis[tar[l]] == 0 or lis[tar[r]] == 0)
        ans = 0;
      l++;
      r--;
    }
    if (sel[tar[n / 2]] != 233) {
      ans = 0;
    }
  } else {
    int l = 0, r = n - 1;
    while (l < r) {
      if (lis[tar[l]] != tar[r] or (lis[tar[l]] == 0 and lis[tar[r]] == 0))
        ans = 0;
      l++;
      r--;
    }
  }
  if (ans == 1)
    cout << "TAK";
  else if (ans == 0)
    cout << "NIE";
}