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

public class Spalindrome {
	
	boolean check (String a) {
	
		ArrayList<Character> letters = new ArrayList<Character>();
		
		letters.add('A');
		letters.add('H');
		letters.add('I');
		letters.add('M');
		letters.add('O');
		letters.add('o');
		letters.add('T');
		letters.add('U');
		letters.add('V');
		letters.add('v');
		letters.add('W');
		letters.add('w');
		letters.add('Y');
		letters.add('X');
		letters.add('x');
		
		int n = a.length();
		
		
		for(int i = 0 ; i<= n/2 ; i++){
			if(letters.contains(a.charAt(i)) && a.charAt(n-i-1) == a.charAt(i)){
				
			}
			else if (a.charAt(i) == 'p' && a.charAt(n-i-1) == 'q' ||
					a.charAt(i) == 'q' && a.charAt(n-i-1) == 'p'){}
			else if (a.charAt(i) == 'b' && a.charAt(n-i-1) == 'd' ||
					a.charAt(i) == 'd' && a.charAt(n-i-1) == 'b'){}
			else
				return true ;
		}
		
		return false ;
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		Spalindrome obj = new Spalindrome();
		String word = scan.next();
		
		if(obj.check(word))
			System.out.println("NIE");
		else
			System.out.println("TAK");
	}

}