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;
template <typename T>
inline void read(T& x) {
  T ll = 1;
  T res = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ll = -1;
    ch = getchar();
  }
  while (isdigit(ch)) res = (res << 3) + (res << 1) + ch - '0', ch = getchar();
  x = res * ll;
}
template <typename T>
void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x < 10)
    putchar(x + '0');
  else {
    print(x / 10);
    putchar(x % 10 + '0');
  }
}
string s;
char change(char c) {
  switch (c) {
    case 'A':
      return 'A';
    case 'H':
      return 'H';
    case 'I':
      return 'I';
    case 'M':
      return 'M';
    case 'O':
      return 'O';
    case 'T':
      return 'T';
    case 'U':
      return 'U';
    case 'V':
      return 'V';
    case 'W':
      return 'W';
    case 'X':
      return 'X';
    case 'Y':
      return 'Y';
    case 'b':
      return 'd';
    case 'd':
      return 'b';
    case 'o':
      return 'o';
    case 'p':
      return 'q';
    case 'q':
      return 'p';
    case 'v':
      return 'v';
    case 'w':
      return 'w';
    case 'x':
      return 'x';
  }
  return '!';
}
string rev(string s) {
  string ret;
  for (int i = 0; i < s.length(); i++) {
    ret += s[s.length() - 1 - i];
  }
  return ret;
}
string hhh(string s) {
  for (int i = 0; i < s.length(); i++) {
    s[i] = change(s[i]);
  }
  return rev(s);
}
int main() {
  string s;
  cin >> s;
  if (s == hhh(s))
    cout << "TAK" << endl;
  else
    cout << "NIE" << endl;
}