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.BufferedReader;
import java.io.InputStreamReader;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.*;
import java.io.*;
/**
 *
 * @author root
 */
public class B {
    public static void main(String arsg[]) throws Exception{
        Scanner in = new Scanner(System.in);
        String str = in.next();
        for(int i = 0;i<str.length()/2;i++){
            char a = str.charAt(i);
            char b = str.charAt(str.length()-i-1);
            if(!isMirror(a, b) && ! isMirror(b, a)){
                System.out.println("NIE");
                return;
            }
        }
        if(str.length()%2 == 1){
            char m = str.charAt(str.length()/2);
            if(!isMirror(m)){
                System.out.println("NIE");
                return;
            }
        }
        System.out.println("TAK");
    }
    public static boolean isMirror(char a){
        return a == 'o'|| a == 'O' || a == 'A' || a == 'H' || a == 'I' || a == 'M' || a == 'T' || a == 'U' 
            || a == 'V' || a == 'v' || a == 'W' || a == 'w' || a == 'X' || a == 'x' || a == 'Y';
    }
    public static boolean isMirror(char a, char b){
        return (a =='o' && b == 'o') || (a =='x' && b == 'x') || (a =='v' && b == 'v') ||
                (a =='w' && b == 'w') || (a =='b' && b == 'd') || (a =='O' && b == 'O') ||
                (a =='X' && b == 'X') || (a =='V' && b == 'V') || (a =='W' && b == 'W') ||
                (a =='A' && b == 'A') || (a =='H' && b == 'H') || (a =='I' && b == 'I') || 
                (a =='M' && b == 'M') || (a =='T' && b == 'T') || (a =='U' && b == 'U') ||
                (a =='Y' && b == 'Y') || (a =='p' && b == 'q'); 


    }
}