#include <bits/stdc++.h>
using namespace std;
map<char, char> lis;
map<char, int> sel;
string tar;
int main() {
  lis['M'] = 'M';
  lis['b'] = 'd';
  lis['d'] = 'b';
  lis['O'] = 'O';
  lis['o'] = 'o';
  lis['p'] = 'q';
  lis['q'] = 'p';
  lis['H'] = 'H';
  lis['A'] = 'A';
  lis['I'] = 'I';
  lis['T'] = 'T';
  lis['U'] = 'U';
  lis['V'] = 'V';
  lis['v'] = 'v';
  lis['w'] = 'w';
  lis['W'] = 'W';
  lis['X'] = 'X';
  lis['x'] = 'x';
  lis['Y'] = 'Y';
  sel['A'] = sel['H'] = sel['I'] = sel['M'] = sel['O'] = sel['o'] = sel['T'] =
      sel['U'] = sel['V'] = sel['v'] = sel['W'] = sel['w'] = sel['X'] =
          sel['x'] = sel['Y'] = 233;
  cin >> tar;
  int n = tar.length();
  bool ans = 1;
  if (n % 2 == 1) {
    int l = 0, r = n - 1;
    while (l < r) {
      if (lis[tar[l]] != tar[r] or lis[tar[l]] == 0 or lis[tar[r]] == 0)
        ans = 0;
      l++;
      r--;
    }
    if (sel[tar[n / 2]] != 233) {
      ans = 0;
    }
  } else {
    int l = 0, r = n - 1;
    while (l < r) {
      if (lis[tar[l]] != tar[r] or (lis[tar[l]] == 0 and lis[tar[r]] == 0))
        ans = 0;
      l++;
      r--;
    }
  }
  if (ans == 1)
    cout << "TAK";
  else if (ans == 0)
    cout << "NIE";
}
