#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, temp;
  cin >> s;
  temp = s;
  map<char, char> mirror;
  mirror['A'] = 'A';
  mirror['H'] = 'H';
  mirror['I'] = 'I';
  mirror['M'] = 'M';
  mirror['O'] = 'O';
  mirror['o'] = 'o';
  mirror['T'] = 'T';
  mirror['U'] = 'U';
  mirror['V'] = 'V';
  mirror['v'] = 'v';
  mirror['W'] = 'W';
  mirror['w'] = 'w';
  mirror['X'] = 'X';
  mirror['x'] = 'x';
  mirror['Y'] = 'Y';
  mirror['b'] = 'd';
  mirror['d'] = 'b';
  mirror['p'] = 'q';
  mirror['q'] = 'p';
  for (long long i = 0; i < s.size(); i++) {
    s[i] = mirror[s[i]];
  }
  reverse(s.begin(), s.end());
  if (s == temp)
    cout << "TAK";
  else
    cout << "NIE";
  return 0;
}
