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;
bool che(string s) {
  for (int i = 0; i < s.size() / 2 + 1; i++) {
    if (s[i] == s[s.size() - i - 1] &&
        (s[i] == 'A' || s[i] == 'W' || s[i] == 'w' || s[i] == 'T' ||
         s[i] == 'Y' || s[i] == 'U' || s[i] == 'I' || s[i] == 'O' ||
         s[i] == 'o' || s[i] == 'H' || s[i] == 'X' || s[i] == 'x' ||
         s[i] == 'V' || s[i] == 'v' || s[i] == 'M'))
      continue;
    else if (s[i] == s[s.size() - i - 1])
      return false;
    if ((s[i] == 'd' && s[s.size() - i - 1] == 'b') ||
        (s[i] == 'b' && s[s.size() - i - 1] == 'd') ||
        (s[i] == 'q' && s[s.size() - i - 1] == 'p') ||
        (s[i] == 'p' && s[s.size() - i - 1] == 'q'))
      continue;
    return false;
  }
  return true;
}
long long x, y, n, m, a[100100], b[100100];
string s, f[100100];
int main() {
  cin >> s;
  if (che(s)) return cout << "TAK", 0;
  cout << "NIE";
  return 0;
}