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> mp;
map<char, char> mp1;
int main() {
  mp['A'] = 'A';
  mp['b'] = 'd';
  mp['d'] = 'b';
  mp['H'] = 'H';
  mp['I'] = 'I';
  mp['M'] = 'M';
  mp['O'] = 'O';
  mp['o'] = 'o';
  mp['p'] = 'q';
  mp['q'] = 'p';
  mp['T'] = 'T';
  mp['U'] = 'U';
  mp['V'] = 'V';
  mp['v'] = 'v';
  mp['W'] = 'W';
  mp['w'] = 'w';
  mp['X'] = 'X';
  mp['x'] = 'x';
  mp['Y'] = 'Y';
  mp1['A'] = 'A';
  mp1['H'] = 'H';
  mp1['I'] = 'I';
  mp1['M'] = 'M';
  mp1['O'] = 'O';
  mp1['o'] = 'o';
  mp1['T'] = 'T';
  mp1['U'] = 'U';
  mp1['V'] = 'V';
  mp1['v'] = 'v';
  mp1['W'] = 'W';
  mp1['w'] = 'w';
  mp1['X'] = 'X';
  mp1['x'] = 'x';
  mp1['Y'] = 'Y';
  char ar[1009];
  gets(ar);
  int len = strlen(ar);
  bool flag = true;
  int half = len / 2;
  if (len == 1) {
    if (mp1.find(ar[0]) != mp1.end() and mp1[ar[0]] == ar[0])
      puts("TAK");
    else
      puts("NIE");
  } else {
    for (int i = 0; i < half; i++) {
      if (mp.find(ar[i]) == mp.end() or mp[ar[i]] != ar[len - i - 1]) {
        flag = false;
        break;
      }
    }
    if (len % 2) {
      if (mp1[ar[half]] != ar[half]) flag = false;
    }
    if (flag)
      puts("TAK");
    else
      puts("NIE");
  }
  return 0;
}