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;
long long int i, j, k;
long long int temp;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  unordered_map<char, char> opps;
  unordered_set<char> syms;
  int n;
  syms.insert('o');
  syms.insert('v');
  syms.insert('w');
  syms.insert('x');
  syms.insert('A');
  syms.insert('H');
  syms.insert('I');
  syms.insert('M');
  syms.insert('O');
  syms.insert('T');
  syms.insert('U');
  syms.insert('V');
  syms.insert('W');
  syms.insert('X');
  syms.insert('Y');
  opps['p'] = 'q';
  opps['q'] = 'p';
  opps['b'] = 'd';
  opps['d'] = 'b';
  string s;
  cin >> s;
  n = s.length();
  bool spal = true;
  for (int i = 0; i < n; ++i) {
    if (!(syms.find(s[i]) != syms.end() && s[i] == s[n - 1 - i]) &&
        !(opps.find(s[i]) != opps.end() && s[n - 1 - i] == opps[s[i]])) {
      spal = false;
      break;
    }
  }
  if (spal)
    cout << "TAK\n";
  else
    cout << "NIE\n";
  return 0;
}