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() {
  long long int t, i, n, x, k, ss = 0, y, j, m, c1, c2, h, q, l;
  string a;
  long long c = 0;
  cin >> a;
  x = a.size();
  for (i = 0; i < x / 2; i++) {
    if ((a[i] == 'p' && a[x - 1 - i] == 'q') ||
        (a[i] == 'b' && a[x - 1 - i] == 'd') ||
        (a[i] == 'q' && a[x - 1 - i] == 'p') ||
        (a[i] == 'd' && a[x - 1 - i] == 'b') ||
        (a[i] == 'A' && a[x - 1 - i] == 'A') ||
        (a[i] == 'I' && a[x - 1 - i] == 'I') ||
        (a[i] == 'H' && a[x - 1 - i] == 'H') ||
        (a[i] == 'M' && a[x - 1 - i] == 'M') ||
        (a[i] == 'o' && a[x - 1 - i] == 'o') ||
        (a[i] == 'O' && a[x - 1 - i] == 'O') ||
        (a[i] == 'V' && a[x - 1 - i] == 'V') ||
        (a[i] == 'v' && a[x - 1 - i] == 'v') ||
        (a[i] == 'w' && a[x - 1 - i] == 'w') ||
        (a[i] == 'T' && a[x - 1 - i] == 'T') ||
        (a[i] == 'U' && a[x - 1 - i] == 'U') ||
        (a[i] == 'W' && a[x - 1 - i] == 'W') ||
        (a[i] == 'x' && a[x - 1 - i] == 'x') ||
        (a[i] == 'X' && a[x - 1 - i] == 'X') ||
        (a[i] == 'Y' && a[x - 1 - i] == 'Y'))
      c++;
  }
  if (x % 2) {
    if (a[i] == 'A' || a[i] == 'I' || a[i] == 'H' || a[i] == 'M' ||
        a[i] == 'o' || a[i] == 'O' || a[i] == 'V' || a[i] == 'v' ||
        (a[i] == 'w') || a[i] == 'W' || a[i] == 'x' || a[i] == 'X' ||
        a[i] == 'Y' || a[i] == 'T' || a[i] == 'U')
      c++;
  }
  if (c == ((x + 1) / 2))
    cout << "TAK" << endl;
  else {
    cout << "NIE" << endl;
  }
  return 0;
}