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() {
  string s;
  cin >> s;
  bool f = 1;
  int n = s.length();
  for (int i = 0; i < n / 2; i++) {
    if ((s[i] == 'A' && s[n - i - 1] == 'A'))
      continue;
    else if ((s[i] == 'M' && s[n - i - 1] == 'M'))
      continue;
    else if ((s[i] == 'H' && s[n - i - 1] == 'H'))
      continue;
    else if ((s[i] == 'U' && s[n - i - 1] == 'U'))
      continue;
    else if ((s[i] == 'T' && s[n - i - 1] == 'T'))
      continue;
    else if ((s[i] == 'Y' && s[n - i - 1] == 'Y'))
      continue;
    else if ((s[i] == 'I' && s[n - i - 1] == 'I'))
      continue;
    else if ((s[i] == 'V' && s[n - i - 1] == 'V'))
      continue;
    else if ((s[i] == 'v' && s[n - i - 1] == 'v'))
      continue;
    else if ((s[i] == 'W' && s[n - i - 1] == 'W'))
      continue;
    else if ((s[i] == 'w' && s[n - i - 1] == 'w'))
      continue;
    else if ((s[i] == 'X' && s[n - i - 1] == 'X'))
      continue;
    else if ((s[i] == 'x' && s[n - i - 1] == 'x'))
      continue;
    else if ((s[i] == 'O' && s[n - i - 1] == 'O'))
      continue;
    else if ((s[i] == 'o' && s[n - i - 1] == 'o'))
      continue;
    else if ((s[i] == 'b' && s[n - i - 1] == 'd') ||
             (s[i] == 'd' && s[n - i - 1] == 'b'))
      continue;
    else if ((s[i] == 'p' && s[n - i - 1] == 'q') ||
             (s[i] == 'q' && s[n - i - 1] == 'p'))
      continue;
    else {
      f = 0;
      break;
    }
  }
  if (n % 2 != 0) {
    if (s[n / 2] != 'x' && s[n / 2] != 'X' && s[n / 2] != 'A' &&
        s[n / 2] != 'H' && s[n / 2] != 'I' && s[n / 2] != 'M' &&
        s[n / 2] != 'o' && s[n / 2] != 'O' && s[n / 2] != 'T' &&
        s[n / 2] != 'U' && s[n / 2] != 'V' && s[n / 2] != 'v' &&
        s[n / 2] != 'Y' && s[n / 2] != 'W' && s[n / 2] != 'w')
      f = 0;
  }
  if (f == 1)
    cout << "TAK" << endl;
  else
    cout << "NIE" << endl;
  return 0;
}