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

public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(new BufferedInputStream(System.in));
		String s=in.next();
		Vector <Character>q =new Vector<Character>();
		q.add('A');
		q.add('W');
		q.add('T');
		q.add('U');
		q.add('I');
		q.add('O');
		q.add('Y');
		q.add('H');
		q.add('V');
		q.add('M');
		q.add('w');
		q.add('o');
		q.add('v');
		q.add('X');
		q.add('x');
		//q.add('m');
			int r=s.length()-1;
			int l=0;
			boolean flag=true;
			while(r>=l){
				if(q.contains(s.charAt(l))&&s.charAt(l)!=s.charAt(r))
				{flag=false;
				break;}
				if(!q.contains(s.charAt(l))){
			 if(s.charAt(l)=='b'&&s.charAt(r)=='d'||s.charAt(l)=='d'&&s.charAt(r)=='b')
				{	l++;r--;continue;}
			else if(s.charAt(l)=='q'&&s.charAt(r)=='p'||s.charAt(l)=='p'&&s.charAt(r)=='q'){
				l++;r--;	continue;
				}
			 flag=false;
			 break;
				}
				l++;
				r--;
				}
			
					

			if(flag){
			System.out.println("TAK");
			}
			else System.out.println("NIE");
		}

	}