You are given a sequence $$$a$$$ of length $$$n$$$. There is a sequence $$$b$$$ which is initially empty. You need to perform $$$n$$$ operations.
In the $$$i$$$-th operation, you can choose one of the following two types of operations:
Solve the following problem for each $$$j$$$, where $$$0 \le j \le n$$$: find the minimum possible number of inversions$$$^\dagger$$$ in $$$b$$$ if exactly $$$j$$$ operations of the first type are performed.
$$$^\dagger$$$ An inversion in a sequence is a pair of elements where the earlier element is greater than the later element. In other words, for a sequence $$$b$$$, a pair $$$(b_i, b_j)$$$ is an inversion only if $$$i \lt j$$$ and $$$b_i \gt b_j$$$.
The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^5$$$), the number of test cases. For each test case:
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$3 \cdot 10^5$$$.
For each test case, output $$$n+1$$$ integers. The $$$j$$$-th integer should be the minimum possible number of inversions when exactly $$$j$$$ operations of the first type are performed, for $$$j=0,\ldots,n$$$.
322 153 2 4 1 263 2 6 1 5 4
1 0 0 6 3 2 1 1 3 7 4 3 3 4 6 8
Consider the first test case.