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;
string s;
bool ok(int x, int y) {
  if (s[x] == 'A' && s[y] == 'A') return true;
  if (s[x] == 'b' && s[y] == 'd') return true;
  if (s[x] == 'd' && s[y] == 'b') return true;
  if (s[x] == 'o' && s[y] == 'o') return true;
  if (s[x] == 'O' && s[y] == 'O') return true;
  if (s[x] == 'w' && s[y] == 'w') return true;
  if (s[x] == 'W' && s[y] == 'W') return true;
  if (s[x] == 'I' && s[y] == 'I') return true;
  if (s[x] == 'M' && s[y] == 'M') return true;
  if (s[x] == 'Y' && s[y] == 'Y') return true;
  if (s[x] == 'X' && s[y] == 'X') return true;
  if (s[x] == 'x' && s[y] == 'x') return true;
  if (s[x] == 'U' && s[y] == 'U') return true;
  if (s[x] == 'p' && s[y] == 'q') return true;
  if (s[x] == 'q' && s[y] == 'p') return true;
  if (s[x] == 'T' && s[y] == 'T') return true;
  if (s[x] == 'v' && s[y] == 'v') return true;
  if (s[x] == 'V' && s[y] == 'V') return true;
  if (s[x] == 'H' && s[y] == 'H') return true;
  return false;
}
int main() {
  cin >> s;
  int sz = s.size() - 1;
  for (int i = 0; i < s.size() / 2 + (s.size() % 2); i++)
    if (not ok(i, sz - i)) {
      cout << "NIE";
      return 0;
    }
  cout << "TAK";
  return 0;
}