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 Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean b=true;
        String s=sc.nextLine();
        
        for (int i=0; i<=s.length()/2 && b; i++)
            if (!Comp(s.charAt(i), s.charAt(s.length()-i-1)))
                b=false;
        
        System.out.println(b?"TAK":"NIE");
                
        
    }
    
    public static boolean Comp(char a, char b) {
        if (a=='W' && b=='W' || a=='T' && b=='T' ||a=='Y' && b=='Y' ||a=='U' && b=='U' ||a=='I' && b=='I' || a=='O' && b=='O' ||
            a=='A' && b=='A' || a=='H' && b=='H' ||a=='X' && b=='X' ||a=='V' && b=='V' ||a=='M' && b=='M' || 
            a=='w' && b=='w' || a=='o' && b=='o' ||a=='p' && b=='q' ||a=='q' && b=='p' ||a=='d' && b=='b' || a=='b' && b=='d' ||
            a=='x' && b=='x' || a=='v' && b=='v')
            return true;
        return false;
    }
    /*
    public static int GCF_NN_N(int a, int b) {
	int aa=Math.abs(a),bb=Math.abs(b);
        while(aa!=0 && bb!=0) {
            if(aa>=bb) 
                aa=aa%bb;
            else 
                bb=bb%aa;
        } 
        int c=aa+bb;
        a/=c; 
        b/=c;

        if (a<0 && b<0 || b<0) {
            a*=-1;
            b*=-1;
        }
        return c;
    }
    */
}