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 Solution {
	private static final char[] YES = {'A', 'H', 'I', 'M','O', 'o', 'T', 'U', 'V', 'v', 'W', 'w', 'X', 'x', 'Y'};
	
	private static boolean symmetric(char c1, char c2) {		
		if (c1 == c2) {
			for (int i = 0; i < YES.length; i++) {
				if (c1 == YES[i]) {
					return true;
				}
			}
			return false;
		} 
		if ((c1 == 'b' && c2 == 'd') || (c1 == 'd' && c2 == 'b')) {
			return true;
		}
		if ((c1 == 'p' && c2 == 'q') || (c1 == 'q' && c2 == 'p')) {
			return true;
		}
		return false;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int low = 0;
		int high = s.length() - 1;
		boolean res = true;
		while (low <= high) {
			if (!symmetric(s.charAt(low), s.charAt(high))) {
				res = false;
				break;
			}
			low++;
			high--;
		}
		System.out.println(res ? "TAK" : "NIE");
	}
}