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 OK(int x, int y) {
  if (x == 'b' && y == 'd') return 1;
  if (x == 'd' && y == 'b') return 1;
  if (x == 'p' && y == 'q') return 1;
  if (x == 'q' && y == 'p') return 1;
  if (x == 'A' && y == 'A') return 1;
  if (x == 'H' && y == 'H') return 1;
  if (x == 'I' && y == 'I') return 1;
  if (x == 'M' && y == 'M') return 1;
  if (x == 'O' && y == 'O') return 1;
  if (x == 'o' && y == 'o') return 1;
  if (x == 'T' && y == 'T') return 1;
  if (x == 'U' && y == 'U') return 1;
  if (x == 'V' && y == 'V') return 1;
  if (x == 'v' && y == 'v') return 1;
  if (x == 'W' && y == 'W') return 1;
  if (x == 'w' && y == 'w') return 1;
  if (x == 'X' && y == 'X') return 1;
  if (x == 'x' && y == 'x') return 1;
  if (x == 'Y' && y == 'Y') return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  string s;
  cin >> s;
  int n = s.size();
  int ok = 1;
  for (int i = 0; i < n; i++) {
    int j = n - i - 1;
    if (!OK(s[i], s[j])) ok = 0;
  }
  if (ok)
    cout << "TAK" << endl;
  else
    cout << "NIE" << endl;
  return 0;
}