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;
struct ToggleSep {};
template <ostream *Out>
struct Dumper {
  static void *&last() {
    static void *p;
    return p;
  }
  static const char *&fieldSep() {
    static const char *s = " ";
    return s;
  }
  static const char *&newLineSep() {
    static const char *s = "\n";
    return s;
  }
  static const char *&keyValSep() {
    static const char *s = "=";
    return s;
  }
  Dumper() { last() = this; }
  ~Dumper() {
    if (this == last()) {
      *Out << newLineSep();
      last() = 0;
    }
  }
  Dumper operator,(ToggleSep) {
    swap(fieldSep(), keyValSep());
    return Dumper();
  }
  template <class T>
  Dumper operator,(const T &e) {
    *Out << fieldSep() << e;
    return Dumper();
  }
};
template <ostream *Out>
struct DumpFirst {
  template <class T>
  Dumper<Out> operator,(const T &e) {
    *Out << e;
    return Dumper<Out>();
  }
};
struct StdinReader {
  StdinReader() {
    ios::sync_with_stdio(0);
    cin.tie(NULL);
  }
} stdinReader;
template <class T>
StdinReader &operator,(StdinReader &sr, T &t) {
  cin >> t;
  return sr;
}
template <class T>
StdinReader &operator,(StdinReader &sr, vector<T> &v) {
  for (auto &x : v) {
    sr, x;
  }
  return sr;
}
int main() {
  auto pal = array<char, 256>();
  for (char x : "AHIMOoTUVvWwXxY") {
    pal[x] = x;
  }
  pal['b'] = 'd';
  pal['d'] = 'b';
  pal['p'] = 'q';
  pal['q'] = 'p';
  string s;
  stdinReader, s;
  int n = s.size();
  bool ok = true;
  for (int i = 0, $i = (n / 2 + n % 2); i < $i; ++i) {
    ok = ok && pal[s[i]] == s[n - i - 1];
  }
  DumpFirst<&cout>(), ok ? "TAK" : "NIE";
}