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;
bool mirror(char a, char b) {
  if (a > b) swap(a, b);
  bool flag = false;
  if (a == 'b' && b == 'd') flag = true;
  if (a == 'A' && b == 'A') flag = true;
  if (a == 'H' && b == 'H') flag = true;
  if (a == 'I' && b == 'I') flag = true;
  if (a == 'o' && b == 'o') flag = true;
  if (a == 'O' && b == 'O') flag = true;
  if (a == 'M' && b == 'M') flag = true;
  if (a == 'p' && b == 'q') flag = true;
  if (a == 'T' && b == 'T') flag = true;
  if (a == 'U' && b == 'U') flag = true;
  if (a == 'v' && b == 'v') flag = true;
  if (a == 'V' && b == 'V') flag = true;
  if (a == 'W' && b == 'W') flag = true;
  if (a == 'w' && b == 'w') flag = true;
  if (a == 'x' && b == 'x') flag = true;
  if (a == 'X' && b == 'X') flag = true;
  if (a == 'Y' && b == 'Y') flag = true;
  return flag;
}
int main() {
  long long n;
  string str;
  cin >> str;
  n = str.size();
  int p = n;
  n = n / 2;
  bool flag = true;
  for (int i = 0; i < p; i++) {
    if (!mirror(str[i], str[p - 1 - i])) flag = false;
  }
  if (flag)
    cout << "TAK" << endl;
  else
    cout << "NIE" << endl;
  return 0;
}