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:
tt=str(raw_input())
k=['A','H','I','M','o','O','T','U','V','v','W','w','X','x','Y']
l=set(k)

leng=len(tt)

r=list(tt)
for x in range(leng):
	if r[x]=='d':
		if r[leng-x-1]=='b':
		#	print 'vv'
			r[leng-x-1]='1'
			r[x]='1'
		
	if r[x]=='b':
		if r[leng-x-1]=='d':
			r[leng-x-1]='1'
			r[x]='1'
		#	print 'tt'
	if r[x]=='p':
		if r[leng-x-1]=='q':
			r[leng-x-1]='1'
			r[x]='1'
		#	print 'tt'
	if r[x]=='q':
		if r[leng-x-1]=='p':
			r[leng-x-1]='1'
			r[x]='1'
		#	print 'tt'	
			

while r.count('1')>0:	
	r.remove('1')
	


flag=0
se=set(r)

tt=''.join(r)
rev=tt[::-1]


if tt==rev:
	if l.issuperset(se):
		print 'TAK'
		flag=1
		
if flag==0:
	print 'NIE'