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.*;
public class Spalindrome{
	public static void main(String q[])throws Exception{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String s=br.readLine();
		char ch[]=s.toCharArray();
		int j=ch.length-1,max=0;
		for(int i=0;i<ch.length;i++){	
			if(i>=j){
				if(i==j){
					if(ch[i]!='A' && ch[i]!='H' &&ch[i]!='I' &&ch[i]!='M' &&ch[i]!='O' &&ch[i]!='T' &&ch[i]!='U' &&ch[i]!='V' &&ch[i]!='W' &&ch[i]!='X' &&ch[i]!='Y' && ch[i]!='o' && ch[i]!='v' && ch[i]!='w' && ch[i]!='x'){
						max=1;
					}
				}
				break;
			}
			if(ch[i]==ch[j]){
				if(ch[i]!='A' && ch[i]!='H' &&ch[i]!='I' &&ch[i]!='M' &&ch[i]!='O' &&ch[i]!='T' &&ch[i]!='U' &&ch[i]!='V' &&ch[i]!='W' &&ch[i]!='X' &&ch[i]!='Y' && ch[i]!='o' && ch[i]!='v' && ch[i]!='w' && ch[i]!='x'){
				max=1;
				//System.out.println("ch[i]=="+ch[i]);
				break;
				}
			}
			else if(ch[i]=='p' || ch[i]=='q' || ch[i]=='b' || ch[i]=='d'){
					if((ch[i]=='p' && ch[j]!='q')||(ch[i]=='q' && ch[j]!='p')||(ch[i]=='b' && ch[j]!='d')||(ch[i]=='d' && ch[j]!='b')){
						max=1;
						break;
					}
					
				
			}
			else if(ch[i]!=ch[j]){
				max=1;
						break;
			}
		j--;
		}
		if(max==1){
			System.out.println("NIE");
		}
		else{
			System.out.println("TAK");
		}
	}

}
//A H I M O T U V W X Y 
//b d o p q v w x
// b d
// p q
//bhushan