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.Locale;
import java.util.StringTokenizer;

public class Main {
    public void solve() throws IOException {
        // write your code here
        String std = "AHIMOoTUVvWwXxYbdpq";
        String s = nextToken ();
        char[] str = s.toCharArray ();
        int n = s.length ();
        boolean res = true;
        for(int i = 0; i < (n + 1)/2; i++){
            if(std.indexOf (str[i]) > -1){
                if(str[i] == 'b'){
                    if(str[n - 1 - i] != 'd') res = false;
                }
                else if(str[i] == 'd'){
                    if(str[n - 1 - i] != 'b') res = false;
                }
                else if(str[i] == 'p'){
                    if(str[n - 1 - i] != 'q') res = false;
                }
                else if(str[i] == 'q'){
                    if(str[n - 1 - i] != 'p') res = false;
                }
                else{
                    if(str[n - 1 - i] != str[i]) res = false;
                }
            }
            else res = false;
        }
        if(res) out.println ("TAK");
        else out.println ("NIE");
        out.close ();

    }

    BufferedReader br;
    StringTokenizer sc;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (sc == null || !sc.hasMoreTokens ()) {
            try {
                sc = new StringTokenizer (br.readLine ());
            } catch (Exception e) {
                return null;
            }
        }
        return sc.nextToken ();
    }

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

    public double nextDouble() throws IOException {
        return Double.parseDouble (nextToken ());
    }

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

    public static void main(String[] args) throws IOException {
        Locale.setDefault (Locale.US);
        new Main ().run ();
    }

    public void run() {
        try {
            br = new BufferedReader (new InputStreamReader (System.in));
            out = new PrintWriter (System.out);

            solve ();

            out.close ();
        } catch (IOException e) {
            e.printStackTrace ();
            System.exit (1);
        }
    }
}