#include <bits/stdc++.h>
const int MAXINT = 2147483640;
const long long MAXLL = 9223372036854775800;
const long long MAXN = 1000000;
const double pi = 3.1415926535897932384626433832795;
using namespace std;
int t[1000];
map<pair<char, char>, int> p;
int main() {
  int kol = 0;
  t['A'] = 1;
  t['H'] = 1;
  t['I'] = 1;
  t['M'] = 1;
  t['O'] = 1;
  t['o'] = 1;
  t['T'] = 1;
  t['U'] = 1;
  t['V'] = 1;
  t['v'] = 1;
  t['W'] = 1;
  t['w'] = 1;
  t['X'] = 1;
  t['x'] = 1;
  t['Y'] = 1;
  p[make_pair('A', 'A')] = 1;
  p[make_pair('H', 'H')] = 1;
  p[make_pair('I', 'I')] = 1;
  p[make_pair('M', 'M')] = 1;
  p[make_pair('O', 'O')] = 1;
  p[make_pair('o', 'o')] = 1;
  p[make_pair('T', 'T')] = 1;
  p[make_pair('U', 'U')] = 1;
  p[make_pair('V', 'V')] = 1;
  p[make_pair('v', 'v')] = 1;
  p[make_pair('W', 'W')] = 1;
  p[make_pair('w', 'w')] = 1;
  p[make_pair('X', 'X')] = 1;
  p[make_pair('x', 'x')] = 1;
  p[make_pair('Y', 'Y')] = 1;
  p[make_pair('b', 'd')] = 1;
  p[make_pair('d', 'b')] = 1;
  p[make_pair('p', 'q')] = 1;
  p[make_pair('q', 'p')] = 1;
  string s;
  cin >> s;
  int f = 0;
  if (s.size() % 2 == 1 && t[s[s.size() / 2]] != 1) f = 1;
  for (int i = 0; i < s.size() / 2; i++)
    if (p[make_pair(s[i], s[s.size() - i - 1])] != 1) f = 1;
  if (f == 0)
    cout << "TAK" << endl;
  else
    cout << "NIE" << endl;
  return 0;
}
