#include <bits/stdc++.h>
using namespace std;
long long i;
string s, ss;
int main() {
  cin >> s;
  for (i = 0; i < s.size() / 2 + s.size() % 2; i++) {
    ss = s[i];
    ss += s[s.size() - i - 1];
    if (ss != "AA" && ss != "bd" && ss != "db" && ss != "oo" && ss != "OO" &&
        ss != "pq" && ss != "qp" && ss != "xx" && ss != "XX" && ss != "ww" &&
        ss != "WW" && ss != "vv" && ss != "VV" && ss != "VV" && ss != "TT" &&
        ss != "YY" && ss != "MM" && ss != "UU" && ss != "HH" && ss != "II") {
      cout << "NIE";
      return 0;
    }
  }
  cout << "TAK";
  return 0;
}
