#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T& x) {
  T ll = 1;
  T res = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ll = -1;
    ch = getchar();
  }
  while (isdigit(ch)) res = (res << 3) + (res << 1) + ch - '0', ch = getchar();
  x = res * ll;
}
template <typename T>
void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x < 10)
    putchar(x + '0');
  else {
    print(x / 10);
    putchar(x % 10 + '0');
  }
}
string s;
char change(char c) {
  switch (c) {
    case 'A':
      return 'A';
    case 'H':
      return 'H';
    case 'I':
      return 'I';
    case 'M':
      return 'M';
    case 'O':
      return 'O';
    case 'T':
      return 'T';
    case 'U':
      return 'U';
    case 'V':
      return 'V';
    case 'W':
      return 'W';
    case 'X':
      return 'X';
    case 'Y':
      return 'Y';
    case 'b':
      return 'd';
    case 'd':
      return 'b';
    case 'o':
      return 'o';
    case 'p':
      return 'q';
    case 'q':
      return 'p';
    case 'v':
      return 'v';
    case 'w':
      return 'w';
    case 'x':
      return 'x';
  }
  return '!';
}
string rev(string s) {
  string ret;
  for (int i = 0; i < s.length(); i++) {
    ret += s[s.length() - 1 - i];
  }
  return ret;
}
string hhh(string s) {
  for (int i = 0; i < s.length(); i++) {
    s[i] = change(s[i]);
  }
  return rev(s);
}
int main() {
  string s;
  cin >> s;
  if (s == hhh(s))
    cout << "TAK" << endl;
  else
    cout << "NIE" << endl;
}
