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.io.* ;
import java.math.* ;
import java.util.* ;
public class Codeshefcode {
	final static long r = 1000000007 ;
	static FasterScanner ip = new FasterScanner() ;
	static PrintWriter op = new PrintWriter(System.out) ; 
	public static void main(String[] args) throws IOException{
		String s = ip.S() ;
		TreeMap<String,String> map = new TreeMap<String,String>() ;
		String s1 = "AbdHIMOopqTUVvWwXxY" ;
		String s2 = "AdbHIMOoqpTUVvWwXxY" ;
		for(int i=0 ; i<19 ; i++)
		    map.put(s1.substring(i,i+1),s2.substring(i,i+1)) ;
		int len=s.length() ;
		String t="" ;
		for(int i=len-1 ; i>=0 ; i--){
		     String tem = s.substring(i,i+1) ;
		     if(map.containsKey(tem))
		    	 t+=map.get(tem) ;
		}
		op.println( t.compareTo(s)==0 ? "TAK" : "NIE") ;	
		Finish() ;	
	}
	static void Finish(){
		op.flush(); 
		op.close();
	}
}
@SuppressWarnings("serial") 
class MyList extends ArrayList<pair>{
	
}
class MyDouble implements Comparable<MyDouble>{
	BigDecimal b ;
    MyDouble a(MyDouble m){
		return new MyDouble((this.b).add(m.b,MathContext.DECIMAL128)) ;
	}
	MyDouble s(MyDouble m){
		return new MyDouble((this.b).subtract(m.b,MathContext.DECIMAL128)) ;
	}
	MyDouble m(MyDouble d){
		return new MyDouble((this.b).multiply(d.b,MathContext.DECIMAL128)) ;
	}
	MyDouble d(MyDouble m){
		return new MyDouble((this.b).divide(m.b,MathContext.DECIMAL128)) ;
	}
	MyDouble(String s){
		b=new BigDecimal(s,MathContext.DECIMAL128) ;
	}
	MyDouble(BigDecimal e){
		b=e ;
	}
	public int compareTo(MyDouble md){
		return this.b.compareTo(md.b) ;
	} 
}
class pair implements Comparable<pair>{
	private long x ;
	private int y ;
	pair(long a,int b){
		x=a ;
		y=b ;		
	}
	public long x(){
		return x ;
	}
	public int y(){
		return y ;
	}
	public int compareTo(pair p){
		int l = Long.compare(this.x,p.x) ;
		if(l!=0)
			return l ;
		return Integer.compare(this.y,p.y) ;
	}
}
class FasterScanner {
 
    private InputStream mIs;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
 
    public FasterScanner() {
        this(System.in);
    }
 
    public FasterScanner(InputStream is) {
        mIs = is;
    }
 
    public int read() {
        if (numChars == -1) {
            throw new InputMismatchException();
    
    }
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = mIs.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0) {
                return -1;
            }
        }
        return buf[curChar++];
    }
 
    public String nextLine() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }
 
    public String S() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
 
    public long l() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }
 
    public int i() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }
 
    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }
 
    public boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    } 
}