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