1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//#include "/Users/dimazhylko/CPPProjects/bits/stdc++.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;

int main(){
	ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);
	int n;
	cin>>n;
	string s;
	cin>>s;
	n=s.length();
	for(int i = 0;i<(n/2);i++){
		if(s[i]!=s[n-i-1]){
			cout<<"NIE"<<endl;
			return 0;
		}
	}
	cout<<"TAK"<<endl;
	return 0;
}