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

/**
 * @author avinash.rao
 *
 */
public class MirrorPalindrome691B {

    public static void main(String[] args) {
        Map<Character, Character> mirrorImage = new HashMap<>();
        mirrorImage.put('A', 'A');
        mirrorImage.put('H', 'H');
        mirrorImage.put('I', 'I');
        mirrorImage.put('M', 'M');
        mirrorImage.put('O', 'O');
        mirrorImage.put('T', 'T');
        mirrorImage.put('U', 'U');
        mirrorImage.put('V', 'V');
        mirrorImage.put('W', 'W');
        mirrorImage.put('X', 'X');
        mirrorImage.put('Y', 'Y');
        mirrorImage.put('H', 'H');
        mirrorImage.put('b', 'd');
        mirrorImage.put('d', 'b');
        mirrorImage.put('o', 'o');
        mirrorImage.put('p', 'q');
        mirrorImage.put('q', 'p');
        mirrorImage.put('v', 'v');
        mirrorImage.put('w', 'w');
        mirrorImage.put('x', 'x');
        Scanner sc = new Scanner(System.in);
        String string = sc.nextLine();
        int len = string.length() - 1;
        boolean sPalindrome = true;
        for (int i = 0; i < string.length() / 2; i++) {
            if (string.charAt(i) != mirrorImage.getOrDefault(string.charAt(len - i), '-')) {
                System.out.println("NIE");
                sPalindrome = false;
                break;
            }
        }
        if (sPalindrome && string.length() % 2 != 0) {
            if (string.charAt(string.length() / 2) != mirrorImage.getOrDefault(string.charAt(string.length() / 2), '-')) {
                System.out.println("NIE");
                sPalindrome = false;
            }
        }
        if (sPalindrome) {
            System.out.println("TAK");
        }
    }
}