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 ss;
  pair<char, char> a[100];
  string sh = "111aBCcDEeFfGghiJjKkLlmNnPQRrSstuyZz";
  string s;
  cin >> s;
  a[0].first = 'A';
  a[0].second = 'A';
  a[1].first = 'b';
  a[1].second = 'd';
  a[2].first = 'd';
  a[2].second = 'b';
  a[3].first = 'H';
  a[3].second = 'H';
  a[4].first = 'I';
  a[4].second = 'I';
  a[5].first = 'M';
  a[5].second = 'M';
  a[6].first = 'O';
  a[6].second = 'O';
  a[7].first = 'o';
  a[7].second = 'o';
  a[8].first = 'p';
  a[8].second = 'q';
  a[9].first = 'q';
  a[9].second = 'p';
  a[10].first = 'T';
  a[10].second = 'T';
  a[11].first = 'U';
  a[11].second = 'U';
  a[12].first = 'V';
  a[12].second = 'V';
  a[13].first = 'v';
  a[13].second = 'v';
  a[14].first = 'W';
  a[14].second = 'W';
  a[15].first = 'w';
  a[15].second = 'w';
  a[16].first = 'X';
  a[16].second = 'X';
  a[17].first = 'x';
  a[17].second = 'x';
  a[18].first = 'Y';
  a[18].second = 'Y';
  for (int i = 0; i < s.length(); i++) {
    for (int j = 0; j < sh.length(); j++)
      if (sh[j] == s[i]) {
        cout << "NIE";
        return 0;
      }
    for (int j = 0; j <= 18; j++) {
      if (a[j].first == (char)s[i]) {
        ss += a[j].second;
        break;
      }
    }
  }
  string aa;
  for (int i = 0; i < ss.length(); i++) aa += ss[ss.length() - i - 1];
  if (aa == s)
    cout << "TAK";
  else
    cout << "NIE";
  return 0;
}