#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 2e5 + 5;
map<char, char> mp;
int main() {
  string s, temp;
  cin >> s;
  temp = s;
  mp['A'] = 'A';
  mp['H'] = 'H';
  mp['I'] = 'I';
  mp['M'] = 'M';
  mp['O'] = 'O';
  mp['o'] = 'o';
  mp['T'] = 'T';
  mp['U'] = 'U';
  mp['V'] = 'V';
  mp['v'] = 'v';
  mp['W'] = 'W';
  mp['w'] = 'w';
  mp['X'] = 'X';
  mp['x'] = 'x';
  mp['Y'] = 'Y';
  mp['b'] = 'd';
  mp['d'] = 'b';
  mp['p'] = 'q';
  mp['q'] = 'p';
  for (long long i = 0; i < s.size(); i++) {
    s[i] = mp[s[i]];
  }
  reverse(s.begin(), s.end());
  if (s == temp)
    cout << "TAK";
  else
    cout << "NIE";
  return 0;
}
