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

public class Spalindrome {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('H');
		set.add('I');
		//set.add('i');
		set.add('M');
		set.add('O');
		set.add('o');
		set.add('T');
		set.add('U');
		set.add('V');
		set.add('v');
		set.add('W');
		set.add('w');
		set.add('X');
		set.add('x');
		set.add('Y');
		Scanner input =new Scanner(System.in);
		String s = input.next();
		int j = s.length()-1;
		int i=0;
		while(j>i){
			if(s.charAt(j)==s.charAt(i) && set.contains(s.charAt(i))){
				j--;
				i++;
			}
			else if((s.charAt(i)=='b' && s.charAt(j)=='d')||(s.charAt(i)=='d' && s.charAt(j)=='b')){
				j--;
				i++;
			}
			else if((s.charAt(i)=='p' && s.charAt(j)=='q')||(s.charAt(i)=='q' && s.charAt(j)=='p')){
				j--;
				i++;
			}
			else{
				System.out.println("NIE");
			   return;
			}
		}
		if(s.length()%2!=0){
			if(set.contains(s.charAt(s.length()/2))){
				System.out.println("TAK");
			}
			else
				System.out.println("NIE");
			return;
		}
		
		System.out.println("TAK");
	}

}