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.*;
public class Main
{
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		HashMap mapa = new HashMap<Character,Character>();
		mapa.put('A','A');
		mapa.put('b', 'd');
		mapa.put('d', 'b');
		mapa.put('H', 'H');
		mapa.put('I', 'I');
		mapa.put('M', 'M');
		mapa.put('O', 'O');
		mapa.put('o', 'o');
		mapa.put('p', 'q');
		mapa.put('q', 'p');
		mapa.put('T', 'T');
		mapa.put('U', 'U');
		mapa.put('v', 'v');mapa.put('V', 'V');
		mapa.put('W', 'W');mapa.put('w', 'w');
		mapa.put('x', 'x');mapa.put('X', 'X');
		mapa.put('Y', 'Y');
		String s = in.next();
		for(int i = 0;i<s.length()/2+1;i++)
		{
			if(mapa.get(s.charAt(i))==null) 
			{
				System.out.println("NIE");
				return;
			}
			char c1 =  (Character) mapa.get(s.charAt(i));
			char c2 = s.charAt(s.length()-i-1);
			if(c1!=c2){
				System.out.println("NIE");
				return;
			}		
		}
		System.out.println("TAK");
	}
}