#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T b, T p, T M) {
  long long ret = 1;
  for (; p > 0; p >>= 1) {
    if (p & 1) ret = (ret * b) % M;
    b = (b * b) % M;
  }
  return (T)ret;
}
template <class T>
inline T lcm(T a, T b) {
  return (a * b) / __gcd(a, b);
}
int dx4[] = {-1, 0, 1, 0};
int dy4[] = {0, 1, 0, -1};
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, -1, 0, 1, -1, 0, 1};
int kx8[] = {1, 1, 2, 2, -1, -1, -2, -2};
int ky8[] = {2, -2, 1, -1, 2, -2, 1, -1};
const double PI = acos(-1.0), EPS = 1e-7;
const long long INF = (long long)1e18 + 7;
const int N = 2e5 + 5, M = 1e9 + 7;
string s, t;
int ok[N];
char re[N];
void fun() {
  ok['A']++;
  re['A'] = 'A';
  ok['b']++;
  re['b'] = 'd';
  ok['d']++;
  re['d'] = 'b';
  ok['H']++;
  re['H'] = 'H';
  ok['I']++;
  re['I'] = 'I';
  ok['M']++;
  re['M'] = 'M';
  ok['O']++;
  re['O'] = 'O';
  ok['o']++;
  re['o'] = 'o';
  ok['p']++;
  re['p'] = 'q';
  ok['q']++;
  re['q'] = 'p';
  ok['T']++;
  re['T'] = 'T';
  ok['U']++;
  re['U'] = 'U';
  ok['V']++;
  re['V'] = 'V';
  ok['v']++;
  re['v'] = 'v';
  ok['W']++;
  re['W'] = 'W';
  ok['w']++;
  re['w'] = 'w';
  ok['X']++;
  re['X'] = 'X';
  ok['x']++;
  re['x'] = 'x';
  ok['Y']++;
  re['Y'] = 'Y';
}
int main() {
  fun();
  cin >> s;
  t = s;
  reverse(s.begin(), s.end());
  for (int i = 0; i < s.size(); i++) {
    if (ok[s[i]] && re[s[i]] == t[i])
      ;
    else {
      puts("NIE");
      return 0;
    }
  }
  puts("TAK");
  return 0;
}
