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<iostream>
#include<string>

using namespace std;


int main()
{
int i,j;
string a;


cin>>i>>a;

for (i = 0, j = a.size()-1; i < j; i++, j--)
{
if (a[i] != a[j])
break;
}
if (i < j) cout<<"NIE";
else cout<<"TAK";

return 0;
}