Under construction

Still being built. Things may change

Konduktor

Interview

Time limit2sMemory limit128 MB

Summary
Count how many times each of N compartments is visited during the first K steps of a back-and-forth walk starting at compartment 1.
Level

Easy3 of 10

Topics
Math, Simulation
Solved
No attempts yet

Problem

Conductor Konrad inspects tickets on the trains of one of two large railway companies.

His train has NN compartments numbered from 11 to NN. Starting at compartment 11, Konrad visits the compartments in this order: 1,2,…,N−1,N,N−1,…,2,1,2,…1, 2, \dots, N-1, N, N-1, \dots, 2, 1, 2, \dots. In other words, he walks from compartment 11 out to compartment NN and back again, repeating this back-and-forth motion forever.

Given the number of compartments NN and the total number of visited compartments KK, determine how many times Konrad visited each compartment.

Input

The first line contains a natural number ZZ (1≤Z≤101 \le Z \le 10), the number of test sets. The test sets follow, one after another.

Each test set consists of a single line with two natural numbers NN (1≤N≤1061 \le N \le 10^6) and KK (1≤K≤1091 \le K \le 10^9), separated by a space. Here NN is the number of compartments and KK is the total number of visited compartments.

Output

For each test set, print on its own line the NN integers A1,A2,…,ANA_1, A_2, \dots, A_N separated by spaces, where AiA_i is the number of ticket inspections carried out in compartment ii.

Examples1

  1. Example 1

    Input
    2
    4 1
    4 5
    
    Expected output
    1 0 0 0
    1 1 2 1