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.*;
import java.io.*;
public class Tester {
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		int i,j,k,l=1,r,m=1,n,o,p,t,size,half,count=0,flag=1,size1;
		String similar="AHIMOoTUVvWwXxY";
		size1=similar.length();
		String s=sc.nextLine();
		size=s.length();
		l=0;r=size-1;
		half=size/2;
		while(l<=r)
		{
			if(s.charAt(l)==s.charAt(r))
			{
				for(i=0;i<size1;i++)
				{	
					if(similar.charAt(i)==s.charAt(l))
					{
						break;
					}
				}
				if(i==size1)
				{
					System.out.println("NIE");
					count++;
					break;
				}
			}
			else
			{
				if((s.charAt(l)=='p'&&s.charAt(r)=='q')||((s.charAt(l)=='q'&&s.charAt(r)=='p'))||(s.charAt(l)=='b'&&s.charAt(r)=='d')||(s.charAt(l)=='d'&&s.charAt(r)=='b'))
				{
					
				}
				else
				{
					System.out.println("NIE");
					count++;
					break;
				}
			}
			l++;r--;
		}
		if(count==0)
		{
			System.out.println("TAK");
		}
	}
}