Problem: Let's call a string "s-palindrome" if it is symmetric about the middle of the string. For example, the string "oHo" is "s-palindrome", but the string "aa" is not. The string "aa" is not "s-palindrome", because the second half of it is not a mirror reflection of the first half.

<image> English alphabet

You are given a string s. Check if the string is "s-palindrome".

Input

The only line contains the string s (1 ≤ |s| ≤ 1000) which consists of only English letters.

Output

Print "TAK" if the string s is "s-palindrome" and "NIE" otherwise.

Examples

Input

oXoxoXo


Output

TAK


Input

bod


Output

TAK


Input

ER


Output

NIE

Solution (in CPP):

Solution:
#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;
}