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 Tester {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int mid = str.length()/2;
		String ex = "AHIMOTUVWXYovwx";
		int flag = 0;
		if(str.length()%2!=0){
			char a = str.charAt(mid);
			
			if(ex.contains(Character.toString(a))){
				
				for(int i=mid-1,j=mid+1;i>=0 && j<str.length();j++,i--){
					char b = str.charAt(i);
					char c = str.charAt(j);
					if(ex.contains(Character.toString(str.charAt(i)))){
						int t = ex.indexOf(str.charAt(i));
						if(str.charAt(j)!=ex.charAt(t))
							flag = 1;	
					}
					else if(!((b=='b' && c=='d') || (b=='p' && c=='q') || (b=='d' && c=='b') || (b=='q' && c=='p')))
						flag = 1;
				}
				if(flag==1)
					System.out.println("NIE");
				else
					System.out.println("TAK");
			}
			else
				System.out.println("NIE");
		}
		else{
			for(int i=mid-1,j=mid;i>=0 && j<str.length();j++,i--){
				char b = str.charAt(i);
				char c = str.charAt(j);
				if(ex.contains(Character.toString(str.charAt(i)))){
					int t = ex.indexOf(str.charAt(i));
					if(str.charAt(j)!=ex.charAt(t))
						flag = 1;	
				}
				else if(!((b=='b' && c=='d') || (b=='p' && c=='q') || (b=='d' && c=='b') || (b=='q' && c=='p')))
					flag = 1;
			}
			if(flag==1)
				System.out.println("NIE");
			else
				System.out.println("TAK");
			}
		}
}