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