#include <bits/stdc++.h>
using namespace std;
int main() {
  int i;
  char check[1000], s[10001];
  char a[] = "AbdHIMOopqTUVvWwXxY";
  char b[] = "AdbHIMOoqpTUVvWwXxY";
  for (i = 0; a[i]; i++) check[a[i]] = b[i];
  scanf("%s", s);
  for (i = 0; i < strlen(s); i++) {
    if (check[s[i]] != s[strlen(s) - i - 1]) {
      printf("NIE\n");
      return 0;
    }
  }
  printf("TAK\n");
  return 0;
}
