1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <bits/stdc++.h>

int main() {
    std::iostream::sync_with_stdio(false);

    int n;
    std::cin >> n;

    std::string bitus_toys, bajtus_toys;
    std::cin >> bitus_toys >> bajtus_toys;

    std::sort(bitus_toys.begin(), bitus_toys.end());
    std::sort(bajtus_toys.begin(), bajtus_toys.end());
    
    if(bitus_toys == bajtus_toys) {
        std::cout << "TAK" << std::endl;
    }
    else {
        std::cout << "NIE" << std::endl;
    }
}