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 JAVA):

Solution:
import java.util.Scanner;

public class Test {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    while (s.hasNextLine()) {
      System.out.println(Spalindrome.input(s.nextLine()));
    }
    s.close();
  }
  public static void main0(String[] args) {
    String[] ins = {
      "oXoxoXo", "bod", "ER"
    };
    for (int i=0; i<ins.length; i++) {
      String s = Spalindrome.input(ins[i]);
      System.out.println(s);
    }
  }
}

class Spalindrome {
  private static String sym = "AHIMOoTUVvWwXxY";
  private static String mir1 = sym + "bdpq";
  private static String mir2 = sym + "dbqp";
  
  public static String input(String str) {
    int len = str.length();
    int mid = len / 2;
    
    if (len%2 == 1 && sym.indexOf(str.charAt(mid)) < 0)
      return "NIE";
    
    for (int i=0; i<mid; i++) {
      int idx = mir1.indexOf(str.charAt(i));
      if (idx < 0) return "NIE";
      if (mir2.charAt(idx) != str.charAt(len-i-1)) return "NIE";
    }
    return "TAK";
  }
}