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;
bool pan(char a) {
  if (a == 'o' || a == 'O' || a == 'H' || a == 'I' || a == 'M' || a == 'T' ||
      a == 'U' || a == 'V' || a == 'v' || a == 'w' || a == 'W' || a == 'x' ||
      a == 'X' || a == 'A' || a == 'Y')
    return 1;
  return 0;
}
bool pan(char a, char b) {
  if (a == b) {
    return pan(a);
  }
  if (a > b) swap(a, b);
  if ((a == 'b' && b == 'd') || (a == 'p' && b == 'q')) {
    return 1;
  }
  return 0;
}
char s[1111];
int len;
int main() {
  int a, b, c, d, e, f, g, h;
  scanf("%s", s);
  len = strlen(s);
  g = 1;
  for (e = 0, f = len - 1; e <= f; e++, f--) {
    if (e != f) {
      g = pan(s[e], s[f]);
      if (!g) break;
    } else {
      g = pan(s[e]);
      if (!g) break;
    }
  }
  if (g) {
    printf("TAK\n");
  } else
    printf("NIE\n");
}