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.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.Vector;


public class hazem {
	static long A,B,m,t,l;

	public static void main(String[] args) throws IOException{
		
		FastScanner sc = new FastScanner();
	    PrintWriter out = new PrintWriter(System.out);
	   String array[]=new String[500];
	   String str =sc.nextToken();
	   array['O']="O";
	   array['o']="o";
	   array['W']="W";
	   array['w']="w";
	   array['T']="T";
	   array['V']="V";
	   array['v']="v";
	   array['d']="b";
	   array['b']="d";
	   array['H']="H";
	   array['M']="M";
	   array['X']="X";
	   array['x']="x";
	   array['I']="I";
	   array['U']="U";
	   array['Y']="Y";
	   array['A']="A";
	   array['q']="p";
	   array['p']="q";
	   

	   
	   int n =str.length();
	   for(int i=0;i<n;i++){
		   if(array[str.charAt(i)]==(null)){
			   System.out.println("NIE");
			   return;
		   }
		   if(!array[str.charAt(i)].equals( str.charAt(n-i-1)+""))
		   {
			   System.out.println("NIE");
			   return;
		   }
			   
		   
	   }
	   System.out.println("TAK");
	   
	    
	    
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    }
	   
	  
	  
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    }
	
	

	    
	    
	    


	


	
	

	
	



	    	
	
 	


	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
  

	  
	   
	    	
	    	
	 
	    
	    
	    		
	  	
	    	
	    	
	 
	 















class FastScanner {




    BufferedReader br;
    StringTokenizer st;

    public FastScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public FastScanner(String s) {
        try {
            br = new BufferedReader(new FileReader(s));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    String nextToken() {
        while (st == null || !st.hasMoreElements()) {
            try {
            	
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(nextToken());
    }

    long nextLong() {
        return Long.parseLong(nextToken());
    }

    double nextDouble() {
        return Double.parseDouble(nextToken());
    }
 
  
}