#include <bits/stdc++.h>
char a[] = "AbdHIMOopqTUVvWwXxY", b[] = "AdbHIMOoqpTUVvWwXxY", r[300];
using namespace std;
int main() {
  int i;
  for (i = 0; i < 19; i++) r[a[i]] = b[i];
  string s;
  cin >> s;
  for (i = 0; i < s.size(); i++)
    if (r[s[i]] != s[s.size() - i - 1]) return puts("NIE"), 0;
  puts("TAK");
}
