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

Solution:
import java.util.Scanner;

public class main {
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		String str=sc.nextLine();
		char arr[]=str.toCharArray();
		int f=0,l=arr.length-1;
		int count=0;
		while(f<=l){
			count=0;
			if(arr[f]=='A' && arr[l]=='A'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='H' && arr[l]=='H'){
				f++;
				l--;
				count=1;
		}
			else if(arr[f]=='I' && arr[l]=='I'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='M' && arr[l]=='M'){
				f++;
				l--;
				count=1;
			}
			
			else if(arr[f]=='O' && arr[l]=='O'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='o' && arr[l]=='o'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='T' && arr[l]=='T'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='U' && arr[l]=='U'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='V' && arr[l]=='V'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='v' && arr[l]=='v'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='W' && arr[l]=='W'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='w' && arr[l]=='w'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='X' && arr[l]=='X'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='x' && arr[l]=='x'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='Y' && arr[l]=='Y'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='b' && arr[l]=='d'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='d' && arr[l]=='b'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='q' && arr[l]=='p'){
				f++;
				l--;
				count=1;
			}
			else if(arr[f]=='p' && arr[l]=='q'){
				f++;
				l--;
				count=1;
			}
			if(count==0)
				break;
		}
		if(f<=l)
			System.out.println("NIE");
		else
			System.out.println("TAK");
	}
}