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 -*-
i = raw_input()
inp = list(i)
#TAK
#NIE

mir={'A':'A','W':'W','T':'T','I':'I','O':'O','U':'U','Y':'Y','b':'d','d':'b','o':'o','p':'q','q':'p','v':'v','w':'w','x':'x','X':'X','M':'M','V':'V','H':'H'}
M=['A', 'o', 'b', 'd', 'I', 'H', 'V', 'M', 'O', 'X', 'q', 'p', 'U', 'T', 'W', 'v', 'Y', 'x', 'w']
def func(x):
       for i in x:
              if i not in M:
                     
                     return 0
       return 1

if func(inp)==1:
       l = len(i)
       if l%2==0:
              i1=i[:]
              i2=i[:]
              i2=i2[::-1]
       else:
              i1=i[:]
              i2=i[:]
              i2=i2[::-1]
       F = []

       #print(inp,i1,i2)
       for item in i2:
              F.append(mir.get(item,item))

       F=''.join(F)
       #print(F)
       if i1==F:
              print"TAK"
       else:
              
              print"NIE"
else:
       print"NIE"