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.HashMap;
import java.util.Scanner;

/**
 *
 * @author Rishabh
 */
public class Main {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        String imp=s.next();
        HashMap<Character,Character> hm=new HashMap<>();
        hm.put('A','A');
        hm.put('b','d');
        hm.put('d','b');
        hm.put('H','H');
        hm.put('I','I');
       
        hm.put('O','O');
        hm.put('o','o');
        hm.put('X','X');
        hm.put('x','x');
        hm.put('W','W');
        hm.put('w','w');
        hm.put('Y','Y');
        hm.put('U','U');
//        hm.put('u','u');
        hm.put('T','T');
        hm.put('p','q');
        hm.put('q','p');
        hm.put('V','V');
        hm.put('v','v');
        hm.put('M','M');
        boolean ans=true;
        for(int i=0,j=imp.length()-1;i<=j;i++,j--){
            if(i==j){
            if(imp.charAt(i)=='A' || imp.charAt(i)=='H' || imp.charAt(i)=='I' || imp.charAt(i)=='M' ||imp.charAt(i)=='O'||imp.charAt(i)=='o'||imp.charAt(i)=='T'||imp.charAt(i)=='U'||imp.charAt(i)=='V'||imp.charAt(i)=='v'||imp.charAt(i)=='W'||imp.charAt(i)=='w'||imp.charAt(i)=='X'||imp.charAt(i)=='x'||imp.charAt(i)=='Y')
            {}
            else{ans=false;break;}
            }
            else{
            if(!hm.containsKey(imp.charAt(i)) || !hm.containsKey(imp.charAt(j)))
            {ans=false;break;}
            else
            {
            if(imp.charAt(j)!=hm.get(imp.charAt(i)))
            {ans=false;break;}
            }
            
            
            }
    
    }
        if(ans==true){System.out.println("TAK");}
        else
            System.out.println("NIE");
    }
}