A word w is a lyndon word if and only if it is strictly smaller than all its proper suffixes. For example, aab is a lyndon word, while aa is not a lyndon word.
Chiaki has a string s_1s_2…s_n of length n. She would like to know l_i, that is the length of the longest prefix of s_is_i+1…s_n which is a lyndon word.
There are multiple test cases. The first line of the input contains an integer T (1≤T≤105), indicating the number of test cases. For each test case:
The first line contains an integer n (1≤n≤105). The second line contains a string s_1s_2…s_n consists of lowercase characters.
The sum of all n does not exceed 105.
For each test case, output n integers denoting l_1,l_2,…,l_n.