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:
//package CF;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A {
    public static void main(String[] args) throws Exception
    {
	Scanner bf = new Scanner(System.in);
	PrintWriter out = new PrintWriter(System.out);
	char [] c = bf.next().toCharArray();
	boolean flag = true;
	for (int i = 0,j = c.length-1; i < c.length/2 && flag; i++,j--)
	{
	    if(!(c[i] == 'p' && c[j] == 'q' || c[i] == 'q' && c[j] == 'p'|| c[i] == 'b' && c[j] == 'd'|| c[i] == 'd' && c[j] == 'b'
		    || c[i] == c[j] && (c[i] == 'v' ||c[i] == 'w' || c[i] == 'x' || c[i] == 'H' || c[i] == 'A'|| c[i] == 'O' || c[i] == 'o'
		    || c[i] == 'T' || c[i] == 'U'|| c[i] == 'V'|| c[i] == 'W'|| c[i] == 'X'|| c[i] == 'Y'|| c[i] == 'M'|| c[i] == 'I')))
		flag = false;
	}
	int i = c.length/2;
	if(c.length % 2 == 1) flag &= c[i] == 'v' ||c[i] == 'w' || c[i] == 'x' || c[i] == 'H' || c[i] == 'A'|| c[i] == 'O' || c[i] == 'o'
		|| c[i] == 'T' || c[i] == 'U'|| c[i] == 'V'|| c[i] == 'W'|| c[i] == 'X'|| c[i] == 'Y'|| c[i] == 'M'|| c[i] == 'I';
	out.println(flag?"TAK":"NIE");
	out.flush();
	out.close();
    }

    static class Scanner {
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s)
	{
	    br = new BufferedReader(new InputStreamReader(s));
	}

	public Scanner(FileReader fileReader)
	{
	    br = new BufferedReader(fileReader);
	}

	public String next() throws IOException
	{
	    while (st == null || !st.hasMoreTokens())
		st = new StringTokenizer(br.readLine());
	    return st.nextToken();
	}

	public int nextInt() throws IOException
	{
	    return Integer.parseInt(next());
	}

	public long nextLong() throws IOException
	{
	    return Long.parseLong(next());
	}

	public String nextLine() throws IOException
	{
	    return br.readLine();
	}

	public boolean ready() throws IOException
	{
	    return br.ready();
	}
    }
}