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.math.BigDecimal;
import java.util.Scanner;

public class Solution {

	public static void main(String args[]) {

		Scanner in = new Scanner(System.in);
		String str = in.next();
		System.out.println(istPalindrom(str.toCharArray()) ? "TAK" : "NIE");
		in.close();
	}

	public static boolean istPalindrom(char[] word) {
		int i1 = 0;
		int i2 = word.length - 1;
		while (i2 > i1) {
			if (word[i1] == 'b' && word[i2] == 'd') {
			} else if (word[i1] == 'H' && word[i2] == 'H') {
			} else if (word[i1] == 'd' && word[i2] == 'b') {
			} else if (word[i1] == 'I' && word[i2] == 'I') {
			}
			else if (word[i1] == 'A' && word[i2] == 'A') {
			}

			/*
			 * else if(str.charAt(i) == 'i') str2+='i'; else if(str.charAt(i) ==
			 * 'l') str2+='l';
			 */
			else if (word[i1] == 'M' && word[i2] == 'M') {
			} else if (word[i1] == 'o' && word[i2] == 'o') {
			} else if (word[i1] == 'O' && word[i2] == 'O') {
			} else if (word[i1] == 'p' && word[i2] == 'q') {
			} else if (word[i1] == 'q' && word[i2] == 'p') {
			} else if (word[i1] == 'T' && word[i2] == 'T') {
			} else if (word[i1] == 'U' && word[i2] == 'U') {
			} else if (word[i1] == 'V' && word[i2] == 'V') {
			} else if (word[i1] == 'v' && word[i2] == 'v') {
			} else if (word[i1] == 'X' && word[i2] == 'X') {
			} else if (word[i1] == 'x' && word[i2] == 'x') {
			} else if (word[i1] == 'Y' && word[i2] == 'Y') {
			} 
			else if (word[i1] == 'W' && word[i2] == 'W') {
			}
			else if (word[i1] == 'w' && word[i2] == 'w') {
			}else
				return false;
			++i1;
			--i2;
		}
		if (word.length % 2 == 1) {
			if (word[word.length / 2] == 'X' || word[word.length / 2] == 'A' || word[word.length / 2] == 'H'
					|| word[word.length / 2] == 'I' || word[word.length / 2] == 'M' || word[word.length / 2] == 'W'
					|| word[word.length / 2] == 'Y' || word[word.length / 2] == 'o' || word[word.length / 2] == 'O'
					|| word[word.length / 2] == 'T' || word[word.length / 2] == 'U' || word[word.length / 2] == 'v' || word[word.length / 2] == 'V'
					|| word[word.length / 2] == 'w' || word[word.length / 2] == 'x' )
				return true;
			else
				return false;
		}
		return true;
	}
}