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;
namespace {
template <typename T>
using min_pq = priority_queue<T, vector<T>, greater<T>>;
long long int expmod(long long int a, long long int b, long long int mod) {
  long long int res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
}  // namespace
const int MAX_N = 200000;
const long long int MODD = 1000000009LL;
const long double EPS = 1e-9;
string s;
set<pair<char, char>> mirrors = {
    {'A', 'A'}, {'b', 'd'}, {'H', 'H'}, {'I', 'I'}, {'M', 'M'}, {'O', 'O'},
    {'o', 'o'}, {'p', 'q'}, {'T', 'T'}, {'U', 'U'}, {'V', 'V'}, {'v', 'v'},
    {'W', 'W'}, {'w', 'w'}, {'X', 'X'}, {'x', 'x'}, {'Y', 'Y'},
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  int n = (int)s.size();
  for (int i = 0; i < (n + 1) / 2; i++) {
    auto p = minmax(s[i], s[n - i - 1]);
    if (!mirrors.count(p)) {
      cout << "NIE" << endl;
      return 0;
    }
  }
  cout << "TAK" << endl;
  return 0;
}