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

Solution:
d={}
d['A']='A'
d['X']='X'
d['W']='W'
d['Y']='Y'
d['O']='O'
d['I']='I'
d['M']='M'
d['T'],d['U'],d['V'],d['H']='T','U','V','H'
d['o'],d['v'],d['w'],d['x'],d['q'],d['p'],d['d'],d['b']='o','v','w','x','p','q','b','d'

s=input()
if len(s)==1:
	x=s[0]
	y=['A','H','O','X','W','V','U','I','T','Y','o','x','v','w']
	if x in y:
		print('TAK')
	else:
		print('NIE')
	exit(0)
j=len(s)//2
k=len(s)-1
i,flag=0,True

while i<=j:
	try:
		x=d[s[i]]
		y=s[k]
		if x!=y:
			flag=False
			break
		i+=1
		k-=1
	except:
		print('NIE')
		exit(0)
if flag:
	print('TAK')
else:
	print('NIE')