#include <bits/stdc++.h>
using namespace std;
char ch[500];
void solve() {
  int i;
  string a = "AbdHIMOopqTUVvWwXxY";
  string b = "AdbHIMOoqpTUVvWwXxY";
  for (i = 0; i < 19; i++) {
    ch[a[i]] = b[i];
  }
}
int main() {
  solve();
  int i, j, k, x, y, len, c = 0;
  string s;
  cin >> s;
  len = s.size();
  bool f = true;
  for (i = 0; i < len; i++) {
    if (ch[s[i]] != s[len - i - 1]) {
      f = false;
      break;
    }
  }
  if (f)
    cout << "TAK";
  else
    cout << "NIE";
}
