1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <string>
using namespace std;
string aaa;
int i;
int main()
{
	cin >> i >> aaa;
	for(i=0; i < aaa.length()/2; i++)
	{
		if(aaa[i]!=aaa[aaa.length()-i-1])
		{
			cout << "NIE";
			return 0;
		}
	}
	cout << "TAK";
	return 0;
}