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.Scanner;
public class sixhundredninetyoneB {
    public static void main(String cheese[]) {
        String string;
        Scanner scanner = new Scanner(System.in);
        string = scanner.nextLine();

        int meme = string.length();
        Boolean islegal = true;
        String[] illegalchars = {"a", "B", "c", "C", "D", "e", "E", "F", "f", "G", "g", "h", "J", "j", "K", "k", "L", "l", "n", "N", "Q", "R", "r", "t", "u", "y",  "i", "P", "m", "s", "S", "Z", "z"}; //undediced of I, lowecase m is illegal
        if (stringContainsItemFromList(string, illegalchars)) {
            System.out.println("NIE");
            System.exit(0);
        } else {
            for (int i = 1; i < meme; i++) {
                if (string.charAt(i) == 'd') {
                    if (string.charAt(meme - i - 1) != 'b') {
                        islegal = false;
                    }
                }

                else if (string.charAt(i) == 'p') {
                    if (string.charAt(meme - i - 1) != 'q') {
                        islegal = false;

                    }
                }

                else if (string.charAt(i) == 'b') {
                    if (string.charAt(meme - i - 1) != 'd') {
                        islegal = false;

                    }
                }

                else if (string.charAt(i) == 'q') {
                    if (string.charAt(meme - i - 1) != 'p') {
                        islegal = false;

                    }
                }

                else if (string.charAt(i) != string.charAt(meme - i - 1)) {
                    islegal = false;
                }

                else if (string.charAt(i) == 's' && (meme % 2 == 0 || i != median(meme) || (meme == 0)) ) {
                    islegal = false;
                }
                else if (string.charAt(i) == 'S' && (meme % 2 == 0 || i != median(meme) || (meme == 0)) ) {
                    islegal = false;
                }
                else if (string.charAt(i) == 'Z' && (meme % 2 == 0 || i != median(meme) || (meme == 0)) ) {
                    islegal = false;
                }
                else if (string.charAt(i) == 'z' && (meme % 2 == 0 || i != median(meme) || (meme == 0)) ) {
                    islegal = false;
                }
                //else if (string.charAt(i) == 'm' && (meme % 2 == 0 || i != median(meme)) ) {
                //    islegal = false;
                //}
            }


        }
        if (islegal) {
            System.out.println("TAK");

        }
        else {
            System.out.print("NIE");

        }


    }





    public static boolean stringContainsItemFromList(String inputString, String[] items)
    {
        for(int i =0; i < items.length; i++)
        {
            if(inputString.contains(items[i]))
            {
                return true;
            }
        }
        return false;
    }

    public static int median(int a) {
        int meme = 0;
        meme = ((a - 1) / 2) + 1;
        return meme - 1;
    }



}