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