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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author P Marecki
 */
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 {
        Map<Character, Character> ok = new HashMap<>();

        private boolean isOK(Character c, Character d) {
            if (!ok.containsKey(c)) return false;
            return (ok.get(c).equals(d));
        }

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

            String from = "AHIMOTUVWXYbdopqvwx";
            String to = "AHIMOTUVWXYdboqpvwx";
            for (int i = 0; i < from.length(); i++) {
                ok.put(from.charAt(i), to.charAt(i));
            }
            String s = in.next();
            int n = s.length();
            if (n % 2 == 1 && !isOK(s.charAt(n / 2), s.charAt(n / 2))) {
                out.println("NIE");
                return;
            }
            for (int i = 0; i < n / 2; i++) {
                if (!isOK(s.charAt(i), s.charAt(n - 1 - i))) {
                    out.println("NIE");
                    return;
                }
            }
            out.println("TAK");
        }

    }

    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();
        }

    }
}