1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
  int a;
  string c,b;
  cin>>a;
  cin>>b>>c;
  sort(b.begin(), b.end());
  sort(c.begin(), c.end());
  if(b==c)
    cout<<"TAK";
    else
    cout<<"NIE";
  return 0;
}