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