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.TreeMap;
import java.util.StringTokenizer;
import java.util.Map;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
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);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            TreeMap<Character, Character> symmetrical = new TreeMap<>();
            symmetrical.put('A', 'A');
            symmetrical.put('b', 'd');
            symmetrical.put('d', 'b');
            symmetrical.put('H', 'H');
            symmetrical.put('I', 'I');
            symmetrical.put('M', 'M');
            symmetrical.put('O', 'O');
            symmetrical.put('o', 'o');
            symmetrical.put('p', 'q');
            symmetrical.put('q', 'p');
            symmetrical.put('T', 'T');
            symmetrical.put('U', 'U');
            symmetrical.put('V', 'V');
            symmetrical.put('v', 'v');
            symmetrical.put('W', 'W');
            symmetrical.put('w', 'w');
            symmetrical.put('X', 'X');
            symmetrical.put('x', 'x');
            symmetrical.put('Y', 'Y');
            int end = (s.length() + 1) / 2;
            for (int i = 0; i < end; i++) {
                if (symmetrical.getOrDefault(s.charAt(i), '-') != s.charAt(s.length() - i - 1)) {
                    out.println("NIE");
                    return;
                }
            }
            out.println("TAK");
        }

    }

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

        public InputReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        private void fillTokenizer() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            fillTokenizer();
            return tokenizer.nextToken();
        }

    }
}