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:

alpha = ['x', 'X', 'o', 'O', 'I', 'W', 'w', 'U','H', 'Y', 'A', 'M', 'T', 'V', 'v']

d = {'p': 'q', 'q': 'p', 'b': 'd', 'd': 'b'}

s = raw_input()
l = len(s)
flag = 0

if l == 1:
    if s[0] not in alpha:
        flag = 1; 
else:
    if l % 2 == 0:
        p = s[:l/2]
        q = s[l/2:]
    else:
        p = s[:l/2+1]
        q = s[l/2:]

    p = list(p)
    q = list(q)
    q.reverse()

    for i, j in zip(p, q):
        if i != j and i not in d:
            flag = 1
            break
        if i != j and d[i] == j:
            continue
        elif i not in alpha or j not in alpha:
            flag = 1
            break

if flag == 0:
    print 'TAK'
else:
    print 'NIE'