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.*;
public class B {
	public static void main(String[] args) throws Exception {
		Scanner scan = new Scanner(System.in);
		HashMap h = new HashMap<Character,Character>();
		h.put('A','A');
		h.put('b', 'd');
		h.put('d', 'b');
		h.put('H', 'H');
		h.put('I', 'I');
		h.put('M', 'M');
		h.put('O', 'O');
		h.put('o', 'o');
		h.put('p', 'q');
		h.put('q', 'p');
		h.put('T', 'T');
		h.put('U', 'U');
		h.put('v', 'v');h.put('V', 'V');
		h.put('W', 'W');h.put('w', 'w');
		h.put('x', 'x');h.put('X', 'X');
		h.put('Y', 'Y');
		String s = scan.next();
		for(int i = 0;i<s.length()/2+1;i++){
			if(h.get(s.charAt(i))==null) {
				System.out.println("NIE");
				return;
			}
			char c1 = (char) h.get(s.charAt(i));
			char c2 = s.charAt(s.length()-i-1);
			if(c1!=c2){
				System.out.println("NIE");
				return;
			}		
		}
		System.out.println("TAK");
	}
}