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 new2 {
	public static void main(String args[]){
		Scanner data = new Scanner(System.in);
		String s = data.nextLine();
		int a[] = new int[200];
		int state=0;
		a['A']='A';a['H']='H';a['I']='I';a['O']='O';a['T']='T';a['W']='W';a['U']='U';a['X']='X';a['Y']='Y';a['V']='V';a['M']='M';
		    a['b']='d';a['d']='b';a['o']='o';a['p']='q';a['q']='p';a['v']='v';a['w']='w';a['x']='x';
		    if(s.length()==1){
		    	if(a[s.charAt(0)]!=s.charAt(0))
		    		state=1;
		    }
		    for(int i=0;i<s.length();i++){
		        char c = s.charAt(i);
		       
		        if(s.charAt(s.length()-1-i)!=a[c]){
		            state=1;
		            break;
		        }
		    }
		    if(state==0)
		        System.out.println("TAK");
		    else
		        System.out.println("NIE");

	}
}