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.*;
public class Prac {
    public static void main(String args[] ) throws Exception {
       Scanner ip=new Scanner(System.in);
       String s=ip.nextLine();
       HashMap<Character,Character> hm=new HashMap<>();
       HashMap<Character,Character> hm1=new HashMap<>();
       hm.put('b', 'd');  hm1.put('o','o');
       hm.put('d','b');   hm1.put('X','X');
       hm.put('p','q');   hm1.put('x','x');
       hm.put('q','p');   hm1.put('O','O');
       hm.put('o','o');    hm1.put('H','H');
       hm.put('X','X');  hm1.put('A','A');
       hm.put('x','x');   
       hm.put('O','O');
       hm.put('H','H');
       hm.put('A','A');
       hm.put('I','I');
       hm.put('M','M');
       hm.put('T','T');
       hm.put('U','U');
       hm.put('V','V');
       hm.put('v','v');
       hm.put('W','W');
       hm.put('w','w');
       hm.put('Y','Y');
       hm1.put('I','I');
       hm1.put('M','M');
       hm1.put('T','T');
       hm1.put('U','U');
       hm1.put('V','V');
       hm1.put('v','v');
       hm1.put('W','W');
       hm1.put('w','w');
       hm1.put('Y','Y');
       int l=0;
       int r=s.length()-1;
       int ans=1;
       if(s.length()%2==0) {
       while(r>l) {
    	   if(hm.containsKey(s.charAt(l))) {
    	   if(hm.get(s.charAt(l))!=s.charAt(r)) {
    		   ans=0;
    		   break;
    	   }else {
    		   l++;
    		   r--;
    	   }
    	   }else {
    		   ans=0;
    		   break;
    	   }
       }
       }else {
    	   if(!hm1.containsKey(s.charAt(s.length()/2))) {
    		   ans=0;
    	   }else {
    		   while(r>l) {
    	    	   if(hm.containsKey(s.charAt(l))) {
    	    	   if(hm.get(s.charAt(l))!=s.charAt(r)) {
    	    		   ans=0;
    	    		   break;
    	    	   }else {
    	    		   l++;
    	    		   r--;
    	    	   }
    	    	   }else {
    	    		   ans=0;
    	    		   break;
    	    	   }
    	       }
    	   }
       }
       if(ans==0) {
    	   System.out.println("NIE");
       }else {
    	   System.out.println("TAK");
       }
    }
}