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 mp[128];
int main() {
  mp[(int)'A'] = (int)'A';
  mp[(int)'b'] = (int)'d';
  mp[(int)'d'] = (int)'b';
  mp[(int)'H'] = (int)'H';
  mp[(int)'I'] = (int)'I';
  mp[(int)'M'] = (int)'M';
  mp[(int)'O'] = (int)'O';
  mp[(int)'o'] = (int)'o';
  mp[(int)'T'] = (int)'T';
  mp[(int)'U'] = (int)'U';
  mp[(int)'V'] = (int)'V';
  mp[(int)'v'] = (int)'v';
  mp[(int)'W'] = (int)'W';
  mp[(int)'w'] = (int)'w';
  mp[(int)'X'] = (int)'X';
  mp[(int)'x'] = (int)'x';
  mp[(int)'Y'] = (int)'Y';
  mp[(int)'q'] = (int)'p';
  mp[(int)'p'] = (int)'q';
  string s;
  cin >> s;
  int len = (int)s.length();
  for (register int i = 0, i_end = len >> 1; i <= i_end; ++i) {
    if (mp[(int)s[i]] != s[len - i - 1]) {
      printf("NIE");
      return 0;
    }
  }
  printf("TAK");
  return 0;
}