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;
const long long mod = 998244353;
map<char, bool> sym;
string s;
void init() {
  sym['A'] = 1;
  sym['H'] = 1;
  sym['I'] = 1;
  sym['M'] = 1;
  sym['O'] = 1;
  sym['T'] = 1;
  sym['U'] = 1;
  sym['V'] = 1;
  sym['W'] = 1;
  sym['X'] = 1;
  sym['Y'] = 1;
  sym['o'] = 1;
  sym['v'] = 1;
  sym['w'] = 1;
  sym['x'] = 1;
}
int main() {
  init();
  cin >> s;
  int n = s.size();
  bool yes = true;
  for (int i = 0; i <= n / 2; i++) {
    char lf = s[i], rg = s[n - i - 1];
    if (lf == 'b' && rg == 'd')
      ;
    else if (lf == 'd' && rg == 'b')
      ;
    else if (lf == 'p' && rg == 'q')
      ;
    else if (lf == 'q' && rg == 'p')
      ;
    else if (lf == rg && sym[lf])
      ;
    else
      yes = false;
  }
  if (yes)
    cout << "TAK\n";
  else
    cout << "NIE\n";
  return 0;
}