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