#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int x = 0, f = 1, ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
string s;
char a[] = {'A', 'H', 'I', 'M', 'O', 'o', 'T', 'U',
            'V', 'v', 'W', 'w', 'X', 'x', 'Y'};
int main() {
  cin >> s;
  if (s.length() % 2 == 1) {
    for (int i = 0; i <= 14; i++) {
      if (s[s.length() / 2] == a[i]) {
        break;
      }
      if (i == 14) {
        printf("NIE");
        return 0;
      }
    }
  }
  for (int i = 0; i < s.length() / 2; i++) {
    bool flag = 0;
    for (int j = 0; j <= 14; j++) {
      if (s[s.length() - i - 1] == a[j] && s[i] == a[j]) {
        flag = 1;
        break;
      }
    }
    if ((s[s.length() - i - 1] == 'b' && s[i] == 'd') ||
        (s[s.length() - i - 1] == 'd' && s[i] == 'b') ||
        (s[s.length() - i - 1] == 'p' && s[i] == 'q') ||
        (s[s.length() - i - 1] == 'q' && s[i] == 'p')) {
      flag = 1;
    }
    if (!flag) {
      printf("NIE");
      return 0;
    }
  }
  puts("TAK");
  return 0;
}
