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 P691A
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String in = scan.nextLine();
		int len = in.length();
		String first = in.substring(0, len/2);
		String last  = in.substring(len-len/2);
		char[] newLast = new StringBuilder(last).reverse().toString().toCharArray();
		if (len % 2 != 0)
		{
			char mid = in.charAt(len/2);
			if (mid != reverseChar(mid))
			{
				System.out.println("NIE");
				return;
			}
		}
		for (int i = 0; i < newLast.length; i++)
			newLast[i] = reverseChar(newLast[i]);
		if (new String(newLast).contains(" "))
			System.out.println("NIE");
		else if (first.equals(new String(newLast)))
			System.out.println("TAK");
		else
			System.out.println("NIE");
	}
	private static char reverseChar(char c)
	{
		if ((c+"").matches("[AHIMOoTUVvWwXxY]"))
			return c;
		if (c == 'b')
			return 'd';
		if (c == 'd')
			return 'b';
		if (c == 'p')
			return 'q';
		if (c == 'q')
			return 'p';
		return ' ';
	}
}