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:
# Name : Sachdev Hitesh
# College : GLSICA

s = input()
rs = list(s[::-1])
b,d,p,q,c='b','d','p','q',0
for i in range(len(rs)):
	if rs[i]==b:
		rs[i]=rs[i].replace(b,d)
	elif rs[i]==d:
		rs[i]=rs[i].replace(d,b)
	elif rs[i]==p:
		rs[i]=rs[i].replace(p,q)
	elif rs[i]==q:
		rs[i]=rs[i].replace(q,p)
rs=''.join(rs)
if rs==s:
	for i in rs:
		if i == 'A' or i == 'H' or i == 'I' or i == 'O' or i == 'T' or i == 'V' or \
		i == 'W' or i == 'X' or i == 'Y' or i == 'M' or i == 'U'  :
			c+=1
		elif i == 'b' or i == 'd' or i == 'p' or i == 'q' or i == 'x' or \
		i == 'w' or i == 'v' or i == 'o':
			c+=1
if c == len(s):
	print("TAK")
else:
	print("NIE")