1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream>
using namespace std;
int tab1p[300], tab2p[300],tab1np[300],tab2np[300];
int n;
string a,b;

int main()
{
    cin>>n;
    cin>>a>>b;
    for(int i = 0; i < n; i++)
    {
        if(i%2 == 0)
        {
            tab1p[ a[i] ] ++;
            tab2p[ b[i] ] ++;
        }
        else
        {
            tab1np[ a[i] ] ++;
            tab2np[ b[i] ] ++;
        }
    }
    for(int i = 'a'; i <= 'z'; i++)
    {
        if( tab1p[i] != tab2p[i] || tab1np[i] != tab2np[i])
        {
            cout<<"NIE";
            return 0;
        }
    }
    cout<<"TAK";
    return 0;
    //tutaj reszta kodu jakos jakos
}