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