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;
#pragma GCC optimize("Ofast")
const long long maxn = 2e5 + 10, N = 3e6, SQ = 1000, base = 800287,
                mod = 1e9 + 7, INF = 1e9 + 10, lg = 22;
const long double eps = 1e-4;
long long n;
string s;
char good[maxn] = {'A', 'H', 'I', 'M', 'O', 'o', 'T', 'U',
                   'V', 'v', 'W', 'w', 'X', 'x', 'Y'};
map<char, char> match;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  n = (long long)s.size();
  match['A'] = 'A', match['b'] = 'd', match['d'] = 'b', match['H'] = 'H';
  match['I'] = 'I', match['M'] = 'M', match['O'] = 'O', match['o'] = 'o';
  match['p'] = 'q', match['q'] = 'p', match['T'] = 'T', match['U'] = 'U';
  match['V'] = 'V', match['v'] = 'v', match['W'] = 'W', match['w'] = 'w';
  match['X'] = 'X', match['x'] = 'x', match['Y'] = 'Y';
  for (long long i = 0; i <= n / 2; ++i) {
    if (!match.count(s[i])) {
      cout << "NIE\n";
      return 0;
    }
    if (match[s[i]] != s[n - 1 - i]) {
      cout << "NIE\n";
      return 0;
    }
  }
  cout << "TAK\n";
}