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;
bool bad_pair(char c1, char c2) {
  if (c1 == 'b' && c2 == 'd') return false;
  if (c1 == 'd' && c2 == 'b') return false;
  if (c1 == 'q') return (c2 != 'p');
  if (c1 == 'p') return (c2 != 'q');
  if (c1 == 'A' || c1 == 'H' || c1 == 'I' || c1 == 'M') return (c1 != c2);
  if (c1 == 'O' || c2 == 'o') return (c1 != c2);
  if (c1 == 'T' || c1 == 'U' || c1 == 'V' || c1 == 'W' || c1 == 'X' ||
      c1 == 'Y')
    return (c1 != c2);
  if (c1 == 'v' || c1 == 'w' || c1 == 'x') return (c1 != c2);
  return true;
}
int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    if (bad_pair(s[i], s[(int)s.size() - i - 1])) {
      cout << "NIE" << endl;
      return 0;
    }
  }
  cout << "TAK" << endl;
  return 0;
}