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.*;

public class main//(String[] args)
{
	static char[] h;
	static char[] g;
	public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);
		String d = s.next();
		h=new char[26];
		g=new char[26];
		
		h[0]='.';//a
		g[0]='A';
		h[1]='d';//b
		g[1]='.';
		h[2]='.';//c
		g[2]='.';
		h[3]='b';//d
		g[3]='.';
		h[4]='.';//e
		g[4]='.';
		h[5]='.';//f
		g[5]='.';
		h[6]='.';//g
		g[6]='.';
		h[7]='.';//h
		g[7]='H';
		h[8]='.';//i**
		g[8]='I';
		h[9]='.';//j
		g[9]='.';
		h[10]='.';//k
		g[10]='.';
		h[11]='.';//l**
		g[11]='.';
		h[12]='.';//m**
		g[12]='M';
		h[13]='.';//n**
		g[13]='.';
		h[14]='o';//o
		g[14]='O';
		h[15]='q';//p
		g[15]='.';
		h[16]='p';//q
		g[16]='Q';
		h[17]='.';//r
		g[17]='.';
		h[18]='.';//s
		g[18]='.';
		h[19]='.';//t
		g[19]='T';
		h[20]='.';//u**
		g[20]='U';
		h[21]='v';//v
		g[21]='V';
		h[22]='w';//w
		g[22]='W';
		h[23]='x';//x
		g[23]='X';
		h[24]='.';//y
		g[24]='Y';
		h[25]='.';//z
		g[25]='.';
		
		
		for(int y=0; y<d.length(); y++)
		{
			char o = d.charAt(d.length()-y-1);
			char t = d.charAt(y);
			if(t-97<0)
			{
				if(g[t-65]!=o)
				{
					System.out.println("NIE");
					return;
				}
			}
			else
			{
				if(h[t-97]!=o)
				{
					System.out.println("NIE");
					return;
				}
			}
		}
		
		System.out.println("TAK");
	}
}