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.*;
import java.util.*;
import java.lang.*;

public class Rextester{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] s = br.readLine().toCharArray();
        br.close();
        char[][] prob = {{'A','A'},{'H','H'},{'M','M'},{'O','O'},{'o','o'},{'U','U'},{'V','V'},{'v','v'},{'W','W'},{'w','w'},{'X','X'},{'x','x'}
                         ,{'Y','Y'},{'p','q'},{'b','d'},{'T','T'},{'I','I'}};
        boolean flag = true;
        for(int i=0;i<=s.length/2;i++){
            boolean flag2=false;
            for(int j=0;j<prob.length;j++){
                if(s[i]==prob[j][0] && s[s.length-i-1]==prob[j][1]){
                    flag2=true;
                    continue;
                }
                else if(s[i]==prob[j][1] && s[s.length-i-1]==prob[j][0]){
                    flag2=true;
                    continue;
                }
            }
            if(!flag2){
                flag=false;
                break;
            }
        }
        if(flag){
            System.out.println("TAK");
        }
        else{
            System.out.println("NIE");
        }
    }
}