#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[1001];
  cin >> s;
  int n = strlen(s);
  int symm[200];
  memset(symm, 0, sizeof(symm));
  symm['A'] = 'A';
  symm['H'] = 'H';
  symm['I'] = 'I';
  symm['M'] = 'M';
  symm['O'] = 'O';
  symm['T'] = 'T';
  symm['U'] = 'U';
  symm['V'] = 'V';
  symm['W'] = 'W';
  symm['X'] = 'X';
  symm['Y'] = 'Y';
  symm['b'] = 'd';
  symm['d'] = 'b';
  symm['o'] = 'o';
  symm['p'] = 'q';
  symm['q'] = 'p';
  symm['v'] = 'v';
  symm['w'] = 'w';
  symm['x'] = 'x';
  int i;
  for (i = 0; i < (n + 1) / 2; i++) {
    if (symm[s[i]] == 0 || symm[s[n - i - 1]] == 0 ||
        symm[s[i]] != s[n - i - 1]) {
      cout << "NIE" << endl;
      break;
    }
  }
  if (i == (n + 1) / 2) cout << "TAK" << endl;
  return 0;
}
