Permutation
InterviewTime limit1sMemory limit128 MB
Check whether n given integers contain each number from 1 to n exactly once and print TAK or NIE.
Problem
Bajtek wrote integers on a piece of paper. Determine whether they form a permutation of the numbers from to , that is, whether each of the numbers appears exactly once in the sequence.
Input
The first line contains a single integer (), the count of numbers Bajtek wrote.
The second line contains integers () separated by spaces, where is the -th number in the sequence.
Output
Print TAK on the first and only line if Bajtek's sequence is a permutation of the numbers from to , or NIE otherwise.