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

public class EC0014B {

	static int[] REVERSES_LOWER = new int[] {-1, 3, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, 16,
			15, -1, -1, -1, -1, 21, 22, 23, -1, -1};
	static int[] REVERSES_UPPER = new int[] {0, -1, -1, -1, -1, -1, -1, 7, 8, -1, -1, -1, 12, -1, 14, -1,
			-1, -1, -1, 19, 20, 21, 22, 23, 24, -1};

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] s = br.readLine().toCharArray();
		int n = s.length;

		boolean works = true;
		for (int i = 0; i < n; i++) {
			if (s[i] < 'a') {
				if (s[n - 1 - i] - 'A' != REVERSES_UPPER[s[i] - 'A']) {
					works = false;
				}
			} else {
				if (s[n - 1 - i] - 'a' != REVERSES_LOWER[s[i] - 'a']) {
					works = false;
				}
			}
		}
		
		System.out.println(works ? "TAK" : "NIE");
		
	}
}