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.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Main {

    public static void main(String[] args) throws Exception{
    
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        int len = line.length();
//        System.out.println(len);
        int x = len/2, y ;
        HashMap<Character,Character> hm = new HashMap<Character,Character>();
        
        hm.put('A','A');
        hm.put('H','H');
        hm.put('I','I');
        hm.put('M','M');
        hm.put('O','O');
        hm.put('T','T');
        hm.put('U','U');
        hm.put('V','V');
        hm.put('W','W');
        hm.put('X','X');
        hm.put('Y','Y');
   
        hm.put('b','d');
        hm.put('d','b');
        hm.put('o','o');
        hm.put('v','v');
        hm.put('w','w');
        hm.put('x','x');
        hm.put('p','q');
        hm.put('q','p');
        
//        hm.put('i','i');
//        hm.put('l','l');
//        hm.put('m','m');
//        hm.put('u','u');
        
        if(len == 1)
        {
        	if(hm.containsKey(line.charAt(0)))
        	{
        		if(hm.get(line.charAt(0)) == line.charAt(0))
        		{
            		System.out.println("TAK");
            		System.exit(0);
        		}
        		else
            	{
            		System.out.println("NIE");
            		System.exit(0);            	
        		}
        	}
        	else
        	{
        		System.out.println("NIE");
        		System.exit(0);
        	}
        }
//    	System.out.println(line.charAt(x));
        if(len%2 == 0)
        {
        	y = x-1;
        }
        else
        {
        	y = x-1;
        	if(hm.containsKey(line.charAt(x)))
        	{
        	if(hm.get(line.charAt(x)) != line.charAt(x))
    		{
        		System.out.println("NIE");
        		System.exit(0);            	
    		}
        	}
        	else
        	{
        		System.out.println("NIE");
        		System.exit(0);
        	}
        	x++;
        }

        int flag = 0;
        while(y >= 0)
        {
        	if(hm.containsKey(line.charAt(y)))
        	{
        		if(hm.get(line.charAt(y)) == line.charAt(x))
        		{
        			y--;
        			x++;
        		}
        		else
            	{
            		flag = 1;
            		break;
            	}
        		
        	}
        	else
        	{
        		flag = 1;
        		break;
        	}
        }
        if(flag == 1)
        	System.out.println("NIE");
        else
        	System.out.println("TAK");
        
          	
    }
}