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 PYTHON):

Solution:
# -*- coding:utf-8 -*-
import sys

def some_func():
    """
    """
    n_str = raw_input()
    cache = {'A':'A','a':'.',
             'B':'.','b':'d',
             'C':'.','c':'.',
             'D':'.','d':'b',
             'E':'.','e':'.',
             'F':'.','f':'.',
             'G':'.','g':'.',
             'H':'H','h':'.',
             'I':'I','i':'.',
             'J':'.','j':'.',
             'K':'.','k':'.',
             'L':'.','l':'.',
             'M':'M','m':'.',
             'N':'.','n':'.',
             'O':'O','o':'o',
             'P':'.','p':'q',
             'Q':'.','q':'p',
             'R':'.','r':'.',
             'S':'.','s':'.',
             'T':'T','t':'.',
             'U':'U','u':'.',
             'V':'V','v':'v',
             'W':'W','w':'w',
             'X':'X','x':'x',
             'Y':'Y','y':'.',
             'Z':'.','z':'.',
             }
    flag = 1
    if len(n_str) ==1:
        if n_str not in ['A','H','I','M','O','o','T','U','V','v','W','w','X','x','Y']:
            flag = 0
    else:
        for v in range(0, len(n_str)/2+1):
            if n_str[v] != cache[n_str[len(n_str)-1-v]]:
                flag=0
                break

    if flag:
        print "TAK"
    else:
        print "NIE"



if __name__ == '__main__':
    some_func()