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 reverse {
	 static public  boolean acc(char c1,char c2) {
			if(c1=='Y'&&c2=='Y'){
		    return true;
			}
			if(c1=='X'&&c2=='X'){
			    return true;
				}
			if(c1=='x'&&c2=='x'){
			    return true;
				}
			else if(c1=='w'&&c2=='w'){
			    return true;
				}
			else if(c1=='W'&&c2=='W'){
			    return true;
				}
			else if(c1=='v'&&c2=='v'){
			    return true;
				}
			else if(c1=='V'&&c2=='V'){
			    return true;
				}
			else if(c1=='U'&&c2=='U'){
			    return true;
				}
			else if(c1=='T'&&c2=='T'){
			    return true;
				}
			else if(c1=='o'&&c2=='o'){
			    return true;
				}
			else if(c1=='O'&&c2=='O'){
			    return true;
				}
			else if(c1=='M'&&c2=='M'){
			    return true;
				}
			else if(c1=='I'&&c2=='I'){
			    return true;
				}
			else if(c1=='A'&&c2=='A'){
			    return true;
				}
			else if(c1=='H'&&c2=='H'){
			    return true;
				}
			else if(c1=='b'&&c2=='d'){
			    return true;
				}
			else if(c1=='p'&&c2=='q'){
			    return true;
				}
			else
				return false;
	 }
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
         String s =in.next();
         in.close();
        int  j =s.length()-1;
        int flag=0;
		 for(int i=0;i<s.length()/2;i++){ 
			 if(acc(s.charAt(i),s.charAt(j))||acc(s.charAt(j),s.charAt(i))){
				 flag=0;
				 j--;
			 }
			 else{
				 flag=1;
				 break;
			 }
			 
		 }
		 if(s.length()%2!=0){
			 if(!acc(s.charAt(s.length()/2),s.charAt(s.length()/2))){
				 flag=1; 
			 }
		 }
		  if (flag==0)
			  System.out.println("TAK");  
		  else
			  System.out.println("NIE"); 
			  
	}
}