#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long double PI = acos(-1.0);
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
map<char, char> mm;
bool isPalindrome(string str) {
  long long int l = 0;
  long long int h = str.length() - 1;
  while (h >= l) {
    ;
    if (mm[str[l++]] != str[h--]) {
      ;
      return false;
    }
  }
  return true;
}
void solve() {
  string s;
  cin >> s;
  if (isPalindrome(s)) {
    cout << "TAK" << endl;
    return;
  }
  cout << "NIE" << endl;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  for (long long int i = 65; i <= 90; i++) {
    mm[(char)i] = '?';
  }
  for (long long int i = 97; i <= 97 + 25; i++) {
    mm[(char)i] = '?';
  }
  mm['A'] = 'A';
  mm['b'] = 'd';
  mm['d'] = 'b';
  mm['H'] = 'H';
  mm['I'] = 'I';
  mm['M'] = 'M';
  mm['O'] = 'O';
  mm['o'] = 'o';
  mm['p'] = 'q';
  mm['q'] = 'p';
  mm['T'] = 'T';
  mm['U'] = 'U';
  mm['V'] = 'V';
  mm['v'] = 'v';
  mm['W'] = 'W';
  mm['w'] = 'w';
  mm['X'] = 'X';
  mm['Y'] = 'Y';
  mm['x'] = 'x';
  ;
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
