#include <bits/stdc++.h>
int judge(char a, char b) {
  if ((a == 'b' && b == 'd') || (a == 'd' && b == 'b')) return 1;
  if ((a == 'p' && b == 'q') || (a == 'q' && b == 'p')) return 1;
  if (a == b && (a == 'H' || a == 'M' || a == 'A' || a == 'T' || a == 'Y' ||
                 a == 'U' || a == 'I'))
    return 1;
  if (a == b && (a == 'W' || a == 'w' || a == 'O' || a == 'o')) return 1;
  if (a == b && (a == 'X' || a == 'x' || a == 'V' || a == 'v')) return 1;
  return 0;
}
int main() {
  char s[1008];
  scanf("%s", s);
  int len = strlen(s);
  int flag = 0;
  for (int i = 0; i < (len + 1) / 2; i++)
    if (judge(s[i], s[len - 1 - i]) == 0) {
      flag = 1;
      break;
    }
  if (flag)
    printf("NIE\n");
  else
    printf("TAK\n");
  return 0;
}
