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.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class B {

	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		char[]a = next().toCharArray();
		int[]opposite = new int[256];
		opposite['A'] = 'A';
		opposite['H'] = 'H';
		opposite['I'] = 'I';
	

		opposite['M'] = 'M';
	
		opposite['O'] = 'O';
		opposite['o'] = 'o';
		opposite['T'] = 'T';
		opposite['U'] = 'U';
		opposite['V'] = 'V';
		opposite['v'] = 'v';
		opposite['W'] = 'W';
		opposite['w'] = 'w';
		opposite['X'] = 'X';
		opposite['x'] = 'x';
		opposite['Y'] = 'Y';
		opposite['b'] = 'd';
		opposite['d'] = 'b';
		opposite['p'] = 'q';
		opposite['q'] = 'p';
		for (int i = 0; i < a.length; i++) {
			if (a[i]!=opposite[a[a.length-1-i]]) {
				System.out.println("NIE");
				return;
			}
		}
		System.out.println("TAK");
		pw.close();
	}
	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	private static String next() throws IOException {
		while (st==null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}