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