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 fun(char s[], int i, int j) {
  if (s[i] == 'o' && s[j] == 'o' || s[i] == 'Y' && s[j] == 'Y' ||
      s[i] == 'X' && s[j] == 'X' || s[i] == 'W' && s[j] == 'W' ||
      s[i] == 'V' && s[j] == 'V' || s[i] == 'U' && s[j] == 'U' ||
      s[i] == 'T' && s[j] == 'T' || s[i] == 'O' && s[j] == 'O' ||
      s[i] == 'M' && s[j] == 'M' || s[i] == 'I' && s[j] == 'I' ||
      s[i] == 'H' && s[j] == 'H' || s[i] == 'A' && s[j] == 'A' ||
      s[i] == 'x' && s[j] == 'x' || s[i] == 'w' && s[j] == 'w' ||
      s[i] == 'v' && s[j] == 'v')
    return 1;
  else if (s[i] == 'b' && s[j] == 'd')
    return 1;
  else if (s[i] == 'd' && s[j] == 'b')
    return 1;
  else if (s[i] == 'q' && s[j] == 'p')
    return 1;
  else if (s[i] == 'p' && s[j] == 'q')
    return 1;
  else
    return 0;
}
int main() {
  char s[1001];
  int flag = 0;
  cin >> s;
  int mid = strlen(s) / 2;
  for (int i = 0, j = strlen(s) - 1; i < mid; i++, j--) {
    if (fun(s, i, j)) {
      continue;
      cout << "here";
    } else {
      cout << "NIE";
      flag = 1;
      break;
    }
  }
  if (flag == 0)
    if (strlen(s) % 2 != 0) {
      if (s[mid] == 'o' || s[mid] == 'Y' || s[mid] == 'X' || s[mid] == 'W' ||
          s[mid] == 'V' || s[mid] == 'U' || s[mid] == 'T' || s[mid] == 'O' ||
          s[mid] == 'M' || s[mid] == 'I' || s[mid] == 'H' || s[mid] == 'A' ||
          s[mid] == 'x' || s[mid] == 'w' || s[mid] == 'v')
        cout << "TAK";
      else
        cout << "NIE";
    } else if (flag == 0)
      cout << "TAK";
  return 0;
}