#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
const long long maxn = 2e5 + 10, N = 3e6, SQ = 1000, base = 800287,
                mod = 1e9 + 7, INF = 1e9 + 10, lg = 22;
const long double eps = 1e-4;
long long n;
string s;
char good[maxn] = {'A', 'H', 'I', 'M', 'O', 'o', 'T', 'U',
                   'V', 'v', 'W', 'w', 'X', 'x', 'Y'};
map<char, char> match;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  n = (long long)s.size();
  match['A'] = 'A', match['b'] = 'd', match['d'] = 'b', match['H'] = 'H';
  match['I'] = 'I', match['M'] = 'M', match['O'] = 'O', match['o'] = 'o';
  match['p'] = 'q', match['q'] = 'p', match['T'] = 'T', match['U'] = 'U';
  match['V'] = 'V', match['v'] = 'v', match['W'] = 'W', match['w'] = 'w';
  match['X'] = 'X', match['x'] = 'x', match['Y'] = 'Y';
  for (long long i = 0; i <= n / 2; ++i) {
    if (!match.count(s[i])) {
      cout << "NIE\n";
      return 0;
    }
    if (match[s[i]] != s[n - 1 - i]) {
      cout << "NIE\n";
      return 0;
    }
  }
  cout << "TAK\n";
}
