for i in [1, 2, ..., n] f[i] = 1
for j in [1, 2, ..., i - 1]
if a[j] < a[i] then
f[i] = max(f[i], f[j] + 1)
The input contains zero or more test cases and is terminated by end-of-file. For each test case:
The first line contains an integer n.
The second line contains n integers.
*
*
* The number of test cases does not exceed 10.
For each case, output n integers which denote.