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 CodeForces {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
        String string = input.nextLine();
        input.close();
        boolean check = true;
        char []str = string.toCharArray();
        for(int i = 0,j = string.length()-1;j>=i;i++,j--){
        	if(str[i]=='A' && str[j]=='A');
        	else if(str[i]=='b' && str[j]=='d');
        	else if(str[i]=='d' && str[j]=='b');
        	else if(str[i]=='b' && str[j]=='d');
        	else if(str[i]=='H' && str[j]=='H');
        	else if(str[i]=='I' && str[j]=='I');
        	else if(str[i]=='M' && str[j]=='M');
        	else if(str[i]=='O' && str[j]=='O');
        	else if(str[i]=='o' && str[j]=='o');
        	else if(str[i]=='p' && str[j]=='q');
        	else if(str[i]=='q' && str[j]=='p');
        	else if(str[i]=='b' && str[j]=='d');
        	else if(str[i]=='T' && str[j]=='T');
        	else if(str[i]=='U' && str[j]=='U');
        	else if(str[i]=='V' && str[j]=='V');
        	else if(str[i]=='v' && str[j]=='v');
        	else if(str[i]=='W' && str[j]=='W');
        	else if(str[i]=='w' && str[j]=='w');
        	else if(str[i]=='X' && str[j]=='X');
        	else if(str[i]=='x' && str[j]=='x');
        	else if(str[i]=='Y' && str[j]=='Y');
        	else{
        		check = false;
        		break;
        	}
        	
        }
        if(check)
        	System.out.println("TAK");
        else
        	System.out.println("NIE");
       
	}
}