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.io.*;
import java.util.*;
public class Spalindrome {
	static String yes;
	public static void main(String[]args)throws Throwable{
		MyScanner sc=new MyScanner();
		yes="AHIMOoTUVvWwXxY";
		String s=sc.next();
		System.out.println(f(s)? "TAK" : "NIE");
	}
	
	public static boolean f(String s){
		int n=s.length();
		if(n%2==1 && !yes.contains(s.charAt(n/2)+""))
			return false;
		for(int i=0;i<n/2;i++){
			char x=s.charAt(i);
			char y=s.charAt(n-1-i);
			if(!mirror(x,y))
				return false;
		}
		return true;
	}
	
	public static boolean mirror(char x,char y){
		if(x==y)
			return (yes.contains(x+""));
		String s1="bdSZszqp";
		String s2="dbZSzspq";
		for(int i=0;i<s1.length();i++)
			if(x==s1.charAt(i) && y==s2.charAt(i))
				return true;
		return false;
	}

	static class MyScanner {
	      BufferedReader br;
	      StringTokenizer st;
	 
	      public MyScanner() {
	         br = new BufferedReader(new InputStreamReader(System.in));
	      }
	 
	      String next() {
	          while (st == null || !st.hasMoreElements()) {
	              try {
	                  st = new StringTokenizer(br.readLine());
	              } catch (IOException e) {
	                  e.printStackTrace();
	              }
	          }
	          return st.nextToken();
	      }
	 
	      int nextInt() {
	          return Integer.parseInt(next());
	      }
	 
	      long nextLong() {
	          return Long.parseLong(next());
	      }
	 
	      double nextDouble() {
	          return Double.parseDouble(next());
	      }
	 
	      String nextLine(){
	          String str = "";
		  try {
		     str = br.readLine();
		  } catch (IOException e) {
		     e.printStackTrace();
		  }
		  return str;
	      }

	   }
}