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.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;

public class B {
	public static void main(String[] args) throws IOException {
		File inputFile = new File("entradaB");
		if (inputFile.exists())
			System.setIn(new FileInputStream(inputFile));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		String line = "";
		HashMap<Character, Character> map = new HashMap<>();
		map.put('A', 'A');
		map.put('b', 'd');
		map.put('d', 'b');
		map.put('H', 'H');
		map.put('I', 'I');
		map.put('M', 'M');
		map.put('O', 'O');
		map.put('o', 'o');
		map.put('p', 'q');
		map.put('q', 'p');
		map.put('T', 'T');
		map.put('U', 'U');
		map.put('V', 'V');
		map.put('v', 'v');
		map.put('W', 'W');
		map.put('w', 'w');
		map.put('X', 'X');
		map.put('x', 'x');
		map.put('Y', 'Y');
		while ((line = in.readLine()) != null) {
			char[] l = line.toCharArray();
			boolean palin = true;
			for (int i = 0; i <= l.length / 2; i++) 
				if (!map.containsKey(l[i]) || l[l.length - i - 1] != map.get(l[i]))
					palin = false;
			out.append(palin ? "TAK\n" : "NIE\n");
		}
		System.out.print(out);
	}

	static int[] readInts(String line) {
		StringTokenizer st = new StringTokenizer(line.trim());
		int a[] = new int[st.countTokens()], index = 0;
		while (st.hasMoreTokens())
			a[index++] = Integer.parseInt(st.nextToken());
		return a;
	}

	static long[] readLongs(String line) {
		StringTokenizer st = new StringTokenizer(line.trim());
		long a[] = new long[st.countTokens()];
		int index = 0;
		while (st.hasMoreTokens())
			a[index++] = Long.parseLong(st.nextToken());
		return a;
	}

	static double[] readDoubles(String line) {
		StringTokenizer st = new StringTokenizer(line.trim());
		double a[] = new double[st.countTokens()];
		int index = 0;
		while (st.hasMoreTokens())
			a[index++] = Double.parseDouble(st.nextToken());
		return a;
	}
}