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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class b {
	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		
		String mirrorCaps = "A------HI---M-O----TUVWXY-";
		String mirrorLows = "-d-b----------oqp----vwx--";
		
		boolean TAK = true;
		for(int i = 0; i < s.length(); i++){
			char c1 = s.charAt(i);
			char c2 = s.charAt(s.length()-1-i);
			if(c1 >= 'a' && c1 <= 'z' && c2 >= 'a' && c2 <= 'z'){
				if(c1 != mirrorLows.charAt(c2-'a')){
					TAK = false;
				}
			}
			else if(c1 >= 'A' && c1 <= 'Z' && c2 >= 'A' && c2 <= 'Z'){
				if(c1 != mirrorCaps.charAt(c2-'A')){
					TAK = false;
				}
			}
			else{
				TAK = false;
			}
		}
		
		if(TAK) System.out.println("TAK");
		else System.out.println("NIE");
	}
}