#include <bits/stdc++.h>
using namespace std;
int const GRAY = -2;
int const BLACK = -1;
int const WHITE = 0;
int const INF = 1e8;
long long const INF64 = 1e18;
template <typename T>
void alert(const T& t) {
  cout << t;
  exit(0);
}
inline long long ugcd(long long a, long long b) {
  return b ? ugcd(b, a % b) : a;
}
long long gcd(long long a, long long b) {
  return ugcd(a, b) * ((a < 0) ^ (b < 0) ? -1 : +1);
}
inline long long ulcm(long long a, long long b) { return a * b / ugcd(a, b); }
long long lcm(long long a, long long b) { return abs(a * b) / gcd(a, b); }
int main(int argc, char* argv[]) {
  string a;
  cin >> a;
  map<char, char> mirror;
  mirror['A'] = 'A';
  mirror['b'] = 'd';
  mirror['d'] = 'b';
  mirror['H'] = 'H';
  mirror['I'] = 'I';
  mirror['M'] = 'M';
  mirror['O'] = 'O';
  mirror['o'] = 'o';
  mirror['p'] = 'q';
  mirror['q'] = 'p';
  mirror['T'] = 'T';
  mirror['U'] = 'U';
  mirror['V'] = 'V';
  mirror['v'] = 'v';
  mirror['W'] = 'W';
  mirror['w'] = 'w';
  mirror['X'] = 'X';
  mirror['x'] = 'x';
  mirror['Y'] = 'Y';
  for (int i = 0; i < a.size(); i++) {
    if (mirror.count(a[i]) == 0 || mirror[a[i]] != a[a.size() - 1 - i]) {
      alert("NIE");
    }
  }
  alert("TAK");
  return 0;
}
