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>
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
constexpr long long MAX = 5100000;
constexpr long long INF = 1LL << 62;
constexpr int inf = 1000000007;
constexpr long long mod = 1000000007LL;
const long double PI = acos(-1);
using namespace std;
int main() {
  string s;
  cin >> s;
  map<char, char> mp;
  {
    string t = "AHIMOoTUVvWwXxY";
    for (int i = 0; i < t.size(); i++) mp[t[i]] = t[i];
    mp['b'] = 'd';
    mp['d'] = 'b';
    mp['p'] = 'q';
    mp['q'] = 'p';
  }
  int n = s.size();
  for (int i = 0; i < n / 2; i++) {
    if (!(mp.count(s[i]) and mp[s[i]] == s[n - 1 - i])) {
      puts("NIE");
      return 0;
    }
  }
  if (n & 1) {
    if (!(mp.count(s[n / 2]) and mp[s[n / 2]] == s[n / 2])) {
      puts("NIE");
      return 0;
    }
  }
  puts("TAK");
  return 0;
}