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;
import java.io.PrintWriter;

public class s_palindrome {

	public static void main(String[] args) throws IOException {
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out=new PrintWriter(System.out);
		String str=reader.readLine();
		int l=str.length()-1;
		boolean flag=false;
		for(int i=0;i<=l/2;i++)
		{
			if(str.charAt(i)=='A' && str.charAt(l-i)=='A'){
				flag=true;
			}
			else if(str.charAt(i)=='H' && str.charAt(l-i)=='H'){
				flag=true;
			}
			else if(str.charAt(i)=='I' && str.charAt(l-i)=='I'){
				flag=true;
			}
			else if(str.charAt(i)=='M' && str.charAt(l-i)=='M'){
				flag=true;
			}
			else if(str.charAt(i)=='O' && str.charAt(l-i)=='O'){
				flag=true;
			}
			else if(str.charAt(i)=='T' && str.charAt(l-i)=='T'){
				flag=true;
			}
			else if(str.charAt(i)=='U' && str.charAt(l-i)=='U'){
				flag=true;
			}
			else if(str.charAt(i)=='V' && str.charAt(l-i)=='V'){
				flag=true;
			}
			else if(str.charAt(i)=='W' && str.charAt(l-i)=='W'){
				flag=true;
			}
			else if(str.charAt(i)=='X' && str.charAt(l-i)=='X'){
				flag=true;
			}
			else if(str.charAt(i)=='Y' && str.charAt(l-i)=='Y'){
				flag=true;
			}
			else if(str.charAt(i)=='b' && str.charAt(l-i)=='d'){
				flag=true;
			}
			else if(str.charAt(i)=='d' && str.charAt(l-i)=='b'){
				flag=true;
			}
			else if(str.charAt(i)=='o' && str.charAt(l-i)=='o'){
				flag=true;
			}
			else if(str.charAt(i)=='p' && str.charAt(l-i)=='q'){
				flag=true;
			}
			else if(str.charAt(i)=='q' && str.charAt(l-i)=='p'){
				flag=true;
			}
			else if(str.charAt(i)=='v' && str.charAt(l-i)=='v'){
				flag=true;
			}
			else if(str.charAt(i)=='w' && str.charAt(l-i)=='w'){
				flag=true;
			}
			else if(str.charAt(i)=='x' && str.charAt(l-i)=='x'){
				flag=true;
			}
			else{
				flag=false;
				break;
			}
		}
		if(flag){
			out.println("TAK");
		}
		else{
			out.println("NIE");
		}
		out.close();
	}
}