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;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll MOD = 998244353;
const int INF = (ll)1e9 + 7;
const ll INFLL = (ll)1e18;
template <class t>
using vvector = vector<vector<t>>;
template <class t>
using vvvector = vector<vector<vector<t>>>;
template <class t>
using priority_queuer = priority_queue<t, vector<t>, greater<t>>;
template <class t, class u>
bool chmax(t &a, u b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class t, class u>
bool chmin(t &a, u b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
namespace templates {
ll modpow(ll x, ll b, ll mod = MOD) {
  ll res = 1;
  while (b) {
    if (b & 1) res = res * x % mod;
    x = x * x % mod;
    b >>= 1;
  }
  return res;
}
ll modinv(ll x) { return modpow(x, MOD - 2); }
bool was_output = false;
template <class t>
void output(t a) {
  if (was_output) cout << " ";
  cout << a;
  was_output = true;
}
void outendl() {
  was_output = false;
  cout << endl;
}
ll in() {
  ll res;
  cin >> res;
  return res;
}
template <class t>
istream &operator>>(istream &is, vector<t> &x) {
  for (auto &i : x) is >> i;
  return is;
}
template <class t, class u>
istream &operator>>(istream &is, pair<t, u> &x) {
  is >> x.first >> x.second;
  return is;
}
template <class t>
t in() {
  t res;
  cin >> res;
  return res;
}
template <class t>
void out(t x) {
  cout << x;
}
template <class t>
vector<t> sorted(
    vector<t> line,
    function<bool(t, t)> comp = [](t a, t b) { return a < b; }) {
  sort(line.begin(), line.end(), comp);
  return line;
}
template <class t>
vector<t> reversed(vector<t> line) {
  reverse(line.begin(), line.end());
  return line;
}
}  // namespace templates
using namespace templates;
int main() {
  map<char, char> oks;
  for (int i = ('a') * (strlen("'z' + 1") != 0);
       i < (int)(strlen("'z' + 1") ? 'z' + 1 : ('a')); ++i) {
    oks[i] = -1;
  }
  for (int i = ('A') * (strlen("'Z' + 1") != 0);
       i < (int)(strlen("'Z' + 1") ? 'Z' + 1 : ('A')); ++i) {
    oks[i] = -1;
  }
  oks['A'] = 'A';
  oks['H'] = 'H';
  oks['M'] = 'M';
  oks['O'] = 'O';
  oks['o'] = 'o';
  oks['T'] = 'T';
  oks['I'] = 'I';
  oks['U'] = 'U';
  oks['V'] = 'V';
  oks['v'] = 'v';
  oks['W'] = 'W';
  oks['w'] = 'w';
  oks['X'] = 'X';
  oks['x'] = 'x';
  oks['Y'] = 'Y';
  oks['b'] = 'd';
  oks['d'] = 'b';
  oks['p'] = 'q';
  oks['q'] = 'p';
  string str = in<string>();
  bool flag = true;
  for (int i = (str.size()) * (strlen("") != 0);
       i < (int)(strlen("") ?: (str.size())); ++i) {
    flag = flag and oks[str[i]] == str[str.size() - 1 - i];
  }
  cout << (flag ? "TAK" : "NIE") << endl;
  return 0;
}