An array $$$b_1, b_2, \ldots, b_m$$$ is good if, for each $$$i$$$ $$$(1 \leq i \lt m)$$$, $$$b_{i+1} \geq b_i$$$ and $$$b_{i+1} - b_i \leq k$$$. An array of length $$$1$$$ is always good.
You are given an initially good array $$$a_1, a_2, \ldots, a_n$$$. Solve the following problem for each $$$i$$$ $$$(1 \leq i \leq n)$$$ independently:
The first line of each input contains $$$t$$$ ($$$1 \leq t \leq 10^4$$$) — the number of test cases.
The first line of each test case contains two integers $$$n$$$ and $$$k$$$ ($$$2 \leq n \leq 2 \cdot 10^5, 1 \leq k \leq 10^9$$$).
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \leq a_i \leq 10^9$$$). It is guaranteed that $$$a$$$ is initially good.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, output $$$n$$$ space separated integers on a single line: the $$$i$$$-th integer denoting the solution to the problem for the $$$i$$$-th index.
74 21 2 4 54 11 2 3 45 71 8 9 16 205 10000000001 6 7 67 67676 11 1 2 2 3 44 11 2 3 34 21 2 4 6
0 1 1 00 2 1 00 2 1 4 00 0 0 0 00 0 0 0 1 00 1 0 00 2 2 0
In the first test case:
In the fourth test case, $$$a$$$ will remain good no matter what element we remove, so the answer for each index is $$$0$$$.