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;
void solve();
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
string s;
bool good(char a, char b) {
  if (a > b) swap(a, b);
  if ((a == 'A' && b == 'A') || (a == 'b' && b == 'd') ||
      (a == 'H' && b == 'H') || (a == 'I' && b == 'I') ||
      (a == 'M' && b == 'M') || (a == 'O' && b == 'O') ||
      (a == 'o' && b == 'o') || (a == 'p' && b == 'q') ||
      (a == 'T' && b == 'T') || (a == 'U' && b == 'U') ||
      (a == 'V' && b == 'V') || (a == 'v' && b == 'v') ||
      (a == 'W' && b == 'W') || (a == 'w' && b == 'w') ||
      (a == 'X' && b == 'X') || (a == 'x' && b == 'x') ||
      (a == 'Y' && b == 'Y')) {
    return true;
  } else
    return false;
}
void solve() {
  cin >> s;
  for (long long i = 0; i < s.size() / 2 + 1; i++) {
    if (!good(s[i], s[s.size() - 1 - i])) {
      cout << "NIE";
      return;
    }
  }
  cout << "TAK";
}