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 Main {

	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		String s=sc.nextLine();
		int c=0;
		char ch1,ch2;
		if(s.length()==1)
		{char ch=s.charAt(0);
			if(ch=='A'||ch=='H'||ch=='I'||ch=='O'||ch=='o'||ch=='U'||ch=='V'||ch=='v'||ch=='W'||ch=='w'||ch=='X'||ch=='x'||
					ch=='T'||ch=='Y'||ch=='M')
				System.out.println("TAK");
			else
				System.out.println("NIE");
		}
			
		
		for(int i=0;i<s.length()/2;i++)
		{  
			ch1=s.charAt(i);
			ch2=s.charAt(s.length()-1-i);
			if((ch1=='b' &&ch2=='d')||(ch1=='d' &&ch2=='b')||(ch1=='p' &&ch2=='q')||(ch1=='q' &&ch2=='p')||(ch1=='A'&&ch2=='A')||(ch1=='H'&&ch2=='H')||(ch1=='I'&&ch2=='I')||(ch1=='O'&&ch2=='O')||(ch1=='o'&& ch2=='o')||(ch1=='U'&& ch2=='U')||(ch1=='V'&& ch2=='V')||(ch1=='v'&& ch2=='v')||(ch1=='W'&& ch2=='W')||(ch1=='w'&& ch2=='w')||(ch1=='X'&& ch2=='X')||(ch1=='x'&& ch2=='x')||
					(ch1=='T'&& ch2=='T')||(ch1=='Y'&& ch2=='Y')||(ch1=='M'&&ch2=='M'))
				c++;
			else
			{System.out.println("NIE");
				break;
			}	
		}
		
		if(c==s.length()/2 && c!=0)
		{	if(s.length()%2==0)
			System.out.println("TAK");
		    else
		    {
		    	char ch=s.charAt(s.length()/2);
				if(ch=='A'||ch=='H'||ch=='I'||ch=='O'||ch=='o'||ch=='U'||ch=='V'||ch=='v'||ch=='W'||ch=='w'||ch=='X'||ch=='x'||
						ch=='T'||ch=='Y'||ch=='M')
					System.out.println("TAK");
				else
					System.out.println("NIE");
		    }
		}
		
	}
	
}