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.Scanner;
import java.util.HashMap;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author KoT
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(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, Scanner in, PrintWriter out) {
            String s = in.next();
            HashMap<Character, Character> map = new HashMap<>();
            map.put('A', 'A');
            map.put('d', 'b');
            map.put('b', 'd');
            map.put('H', 'H');
            map.put('M', 'M');
            map.put('I', 'I');
            map.put('O', 'O');
            map.put('o', 'o');
            map.put('p', 'q');
            map.put('q', 'p');
            map.put('T', 'T');
            map.put('U', 'U');
            map.put('V', 'V');
            map.put('v', 'v');
            map.put('W', 'W');
            map.put('w', 'w');
            map.put('X', 'X');
            map.put('x', 'x');
            map.put('Y', 'Y');
            boolean result = true;
            for (int i = 0; i < s.length(); ++i) {
                if (!map.containsKey(s.charAt(i))) result = false;
                else if (map.get(s.charAt(i)) != s.charAt(s.length() - i - 1)) result = false;
            }
            out.print(result ? "TAK" : "NIE");
        }

    }
}