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.io.PrintStream;
import java.util.Scanner;


public class B {

	private static Scanner in = new Scanner(System.in);
	private static PrintStream out = System.out;
	//private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	//private static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
	
	private static char[] A = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z".toCharArray();
	private static char[] B = "A             H I       M   O         T U V W X Y     d   b                     o q p         v w x    ".toCharArray();
	
	private static char reflect(char c) {
		for (int i = 0; i < A.length; ++i)
			if (A[i] == c)
				return B[i];
		throw new RuntimeException();
	}
	
	public static void main(String[] args) {
		char[] s = in.next().toCharArray();
		int n = s.length;
		boolean ans = true;
		int boundary = (n%2 == 0) ? n/2 : (n/2 + 1); 
		for (int i = 0; i < boundary; ++i)
			if (s[i] != reflect(s[n - i - 1]))
				ans = false;
		out.println(ans ? "TAK" : "NIE");
	}

}