#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;
}
