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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;


public class Main {
	static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	static PrintWriter writer = new PrintWriter(System.out,false);
	static int[][] a;static int count=0,k1,k2;
	static boolean[][] visited;
	static int[] row={-1,-1,0,1,1,1,0,-1};
	static int[] col={0,1,1,1,0,-1,-1,-1};
	static Stack s;
	@SuppressWarnings("unchecked")
	public static void main(String[] args) throws IOException{
		int t,n,m;
		//StringTokenizer st=new StringTokenizer(reader.readLine());
		//t=Integer.parseInt(st.nextToken());
		Scanner s=new Scanner(System.in);
		String str=s.nextLine();
		HashSet hs =new HashSet();
		hs.add("A");
		hs.add("H");
		hs.add("I");
		hs.add("M");
		hs.add("O");
		hs.add("o");
		hs.add("T");
		hs.add("U");
		hs.add("V");
		hs.add("v");
		hs.add("W");
		hs.add("w");
		hs.add("X");
		hs.add("x");
		hs.add("Y");
		n=str.length();
		int i;
		for( i=0;i<n;i++){
			if(str.charAt(i)==str.charAt(n-i-1)&&hs.contains(str.charAt(i)+""))
				continue;
			if(str.charAt(i)=='b'&&str.charAt(n-i-1)=='d'||str.charAt(i)=='p'&&str.charAt(n-i-1)=='q'||str.charAt(i)=='q'&&str.charAt(n-i-1)=='p'||str.charAt(i)=='d'&&str.charAt(n-i-1)=='b')
				continue;
			else
				break;
		}
	/*	if(n%2==1){
			if(hs.contains(str.charAt(n/2)+""))
				i=n/2;
			else 
				i=0;
		}*/
		if(i==n)
			System.out.println("TAK");
		else
			System.out.println("NIE");
		writer.flush();
		writer.close();
		reader.close();
	}
}