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 str;
set<pair<char, char> > s;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> str;
  s.insert({'A', 'A'});
  s.insert({'b', 'd'});
  s.insert({'d', 'b'});
  s.insert({'H', 'H'});
  s.insert({'I', 'I'});
  s.insert({'M', 'M'});
  s.insert({'O', 'O'});
  s.insert({'o', 'o'});
  s.insert({'p', 'q'});
  s.insert({'q', 'p'});
  s.insert({'T', 'T'});
  s.insert({'U', 'U'});
  s.insert({'V', 'V'});
  s.insert({'v', 'v'});
  s.insert({'W', 'W'});
  s.insert({'w', 'w'});
  s.insert({'X', 'X'});
  s.insert({'x', 'x'});
  s.insert({'Y', 'Y'});
  long long l = 0, r = str.size() - 1;
  while (l <= r) {
    if (s.find({str[l], str[r]}) == s.end()) {
      cout << "NIE";
      return 0;
    }
    l++;
    r--;
  }
  cout << "TAK";
  return 0;
}