Little Bytie really enjoys watching Formula One races which are held annually on a track between Bytetown and Byteburg. The most exciting moments for him are overtakes. He would like to see as many of them as possible.
Bytie is dreaming of a race in which N Formula One cars compete and the car that started the race at the i-th position (for each 1<i<N) performs Ai overtakes during the race. We assume for simplicity that at each moment of time at most one overtaking takes place, in which exactly two cars participate (that is, one car goes past another car).
Bytie is wondering whether such a race is possible at all. Could you help him figure this out?
有 n 辆赛车，从 1 到 n 依次出发。比赛结束时，你听说第 i 辆车超了 ai
The first line of input contains one positive integer i that represents the number of test cases that follow.
Each test case is described in two lines. The first line contains one integer N(1<=N<=1000 000): the number of cars that participate in the race. The second line holds a sequence of N integers A1,A2….An(0<=Ai<=10^9) that gives the number of overtakes performed by the respective cars.
The size of a single input file does not exceed 20MB.
Your program should output T lines containing answers to the respective test cases. Each line should hold a single word TAK (Polish for yes) or NIE (Polish for no) depending on whether the race described by the test case is possible or not.
0 1 4
1 1 3