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.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;

public class ECR14B {
	public static void main(String[] args) {
		FastScanner in=new FastScanner();
		HashMap<Character,Character> map=new HashMap<Character,Character>();
		map.put('A','A');
		map.put('b','d');
		map.put('d','b');
		map.put('H','H');
		map.put('I','I');
		map.put('M','M');
		map.put('O','O');
		map.put('o','o');
		map.put('p','q');
		map.put('q','p');
		map.put('T','T');
		map.put('U','U');
		map.put('V','V');
		map.put('v','v');
		map.put('W','W');
		map.put('w','w');
		map.put('X','X');
		map.put('x','x');
		map.put('Y','Y');
		
		String a=in.nextToken();
		int n=a.length();
		for(int i=0;i<n/2+1;i++){
			if(!map.containsKey(a.charAt(i))){
				System.out.println("NIE");
				return;
			}
			if(!map.containsKey(a.charAt(n-i-1))){
				System.out.println("NIE");
				return;
			}
			if(map.get(a.charAt(i))!=a.charAt(n-i-1)){
				System.out.println("NIE");
				return;
			}
		}
		System.out.println("TAK");
	}
	static class FastScanner{
		BufferedReader br;
		StringTokenizer st;
		public FastScanner(){br=new BufferedReader(new InputStreamReader(System.in));}
		String nextToken(){
			while(st==null||!st.hasMoreElements())
				try{st=new StringTokenizer(br.readLine());}catch(Exception e){}
			return st.nextToken();
		}
		int nextInt(){return Integer.parseInt(nextToken());}
		long nextLong(){return Long.parseLong(nextToken());}
		double nextDouble(){return Double.parseDouble(nextToken());}
	}
}