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.*;
public class s_palindrome
{
  public static void main(String[] args)
  {
    Scanner in = new Scanner(System.in);
    String s = in.next();
    String q = "";
    for ( int i = s.length() - 1; i >= 0; i-- )
    {
      q += rev( s.substring(i,i+1) );
    }
    if ( q.equals(s) )
    {
      System.out.print("TAK");
    }
    else
    {
      System.out.print("NIE");
    }
  }
  public static String rev( String q )
  {
    String w = "????";
    if ( q.equals("A") )
    {
      w = "A";
    }
    if ( q.equals("b") )
    {
      w = "d";
    }
    if ( q.equals("d") )
    {
      w = "b";
    }
    if ( q.equals("H") )
    {
      w = "H";
    }
    if ( q.equals("I") )
    {
      w = "I";
    }
    if ( q.equals("M") )
    {
      w = "M";
    }
    if ( q.equals("O") )
    {
      w = "O";
    }
    if ( q.equals("o") )
    {
      w = "o";
    }
    if ( q.equals("T") )
    {
      w = "T";
    }
    if ( q.equals("U") )
    {
      w = "U";
    }
    if ( q.equals("V") )
    {
      w = "V";
    }
    if ( q.equals("v") )
    {
      w = "v";
    }
    if ( q.equals("W") )
    {
      w = "W";
    }
    if ( q.equals("w") )
    {
      w = "w";
    }
    if ( q.equals("X") )
    {
      w = "X";
    }
    if ( q.equals("x") )
    {
      w = "x";
    }
    if ( q.equals("Y") )
    {
      w = "Y";
    }
    if ( q.equals("q") )
    {
      w = "p";
    }
    if ( q.equals("p") )
    {
      w = "q";
    }
    
    return w;
  }
}