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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;


/* JAVA
JAVA
JAVA
JAVAJAVAJAVAJAVA
JAVA
JAVAJAVAJAVAJAVA
JAVAJAVAJAVA
JAVAJAVAJAVAJAVAJAVAJAVAJAVA
JAVA
JAVA
JAVA
JAVAJAVA
JAVA
JAVA
JAVA
JAVA

















 */

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        int testCount = 1;
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }


    static class TaskA {


        String s1 = "AIMHOWVUTXxovYwbdpq", s2 = "AIMHOWVUTXxovYwdbqp";
        char[] rev;



        public void solve(int testNumber, InputReader in, PrintWriter out) {

            String s = in.next();
            int ans = 0, ans1 = 0;
            rev = new char[999];
            for (int i = 0; i < s1.length(); i++) {
                rev[s1.charAt(i)] = s2.charAt(i);
            }
            for (int i = 0; i < s.length(); i++) {
                if (rev[s.charAt(i)] != s.charAt(s.length() - i - 1)) {
                    out.println("NIE");
                    return;
                }
            }
            out.println("TAK");// else out.println("NIE");
        }


    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

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

    }
}