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

// Sachin_2961 submission //
public class CodeforcesA {

    public void solve() {
        char[]str = fs.n().toCharArray();
        int n = str.length;
        String self = "AHIMOoTUVvWwXxY";
        Map<Character,Character>map = new HashMap<>();
        map.put('b','d');map.put('d','b');
        map.put('p','q');map.put('q','p');
        String ans = "TAK";
        for(int i=0;i<(n+1)/2;i++){
            if( str[i] != str[n-i-1] ){
                boolean ok = false;
                for(char c:map.keySet()){
                    if(c == str[i] && map.get(c)==str[n-i-1])ok=true;
                }
                if(!ok){
                    ans = "NIE";break;
                }
            }else if(!self.contains(""+str[i])){
                ans = "NIE";break;
            }
        }
        out.println(ans);
    }

    static boolean multipleTestCase = false; static FastScanner fs; static PrintWriter out;
    public void run(){
        fs = new FastScanner();
        out = new PrintWriter(System.out);
        int tc = (multipleTestCase)?fs.nInt():1;
        while (tc-->0)solve();
        out.flush();
        out.close();
    }
    public static void main(String[]args){
        try{
            new CodeforcesA().run();
        }catch (Exception e){
            e.printStackTrace();
        }

    }
    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String n() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        String Line()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
        int nInt() {return Integer.parseInt(n()); }
        long nLong() {return Long.parseLong(n());}
        int[]aI(int n){
            int[]ar = new int[n];
            for(int i=0;i<n;i++)
                ar[i] = nInt();
            return ar;
        }
    }
}