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