You are given two integers $$$n$$$ and $$$k$$$. For an integer $$$m$$$ ($$$1 \leq m \leq n$$$), consider a binary string of length $$$n$$$, where the first $$$n-m$$$ characters are $$$0$$$ and the last $$$m$$$ characters are $$$1$$$. You can perform the following operation on it any number of times:
Let $$$f(m)$$$ be the minimum number of operations required to make all bits in the string $$$0$$$, or $$$-1$$$ if it is impossible.
Your task is to compute $$$f(m)$$$ for all $$$m$$$ from $$$1$$$ to $$$n$$$.
The first line contains a single integer $$$t$$$ $$$(1 \leq t \leq 10^4)$$$ — the number of test cases.
The first and only line of each test case contains two integers $$$n$$$ and $$$k$$$ $$$(1 \leq k \leq n \leq 3 \cdot 10^5)$$$.
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$$$ integers — the $$$m$$$-th integer represents $$$f(m)$$$.
34 13 37 5
1 2 3 4 -1 -1 1 3 2 3 2 1 4 3
In the third test case, we have $$$n=7$$$ and $$$k=5$$$. For $$$m = 3$$$, the string looks like $$$0000111$$$. For this string, we can perform the following operations:
So we can make all bits $$$0$$$ in $$$3$$$ operations. It can be shown that it is impossible to achieve this in less than $$$3$$$ operations. So $$$f(3) = 3$$$.
In the second test case we have $$$n = 3$$$, and $$$k = 3$$$. For $$$m = 1$$$, the string looks like $$$001$$$. For this string, in one operation you can only flip all the bits together. So after one operation, the string becomes $$$110$$$, after two operations, the string becomes $$$001$$$ again. So it is impossible to make all bits $$$0$$$ in this case. So $$$f(1) = -1$$$.