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>
int judge(char a, char b) {
  if ((a == 'b' && b == 'd') || (a == 'd' && b == 'b')) return 1;
  if ((a == 'p' && b == 'q') || (a == 'q' && b == 'p')) return 1;
  if (a == b && (a == 'H' || a == 'M' || a == 'A' || a == 'T' || a == 'Y' ||
                 a == 'U' || a == 'I'))
    return 1;
  if (a == b && (a == 'W' || a == 'w' || a == 'O' || a == 'o')) return 1;
  if (a == b && (a == 'X' || a == 'x' || a == 'V' || a == 'v')) return 1;
  return 0;
}
int main() {
  char s[1008];
  scanf("%s", s);
  int len = strlen(s);
  int flag = 0;
  for (int i = 0; i < (len + 1) / 2; i++)
    if (judge(s[i], s[len - 1 - i]) == 0) {
      flag = 1;
      break;
    }
  if (flag)
    printf("NIE\n");
  else
    printf("TAK\n");
  return 0;
}