Professor GukiZ has hobby — constructing different arrays. His best student, Nenad, gave him the following task that he just can't manage to solve:

Construct an $n$-element array, $\mbox{A}$, where the sum of all elements is equal to $\boldsymbol{\mathrm{~S~}}$ and the sum of absolute differences between each pair of elements is equal to $\boldsymbol{\mbox{k}}$. All elements in $\mbox{A}$ must be non-negative integers.

$A_0+A_1+\ldots+A_{n-1}=s$

$\sum_{i=0}^{n-1}\sum_{j=i}^{n-1}|A_i-A_j|=k$

If there is more then one such array, you need to find the lexicographically smallest one. In the case no such array $\mbox{A}$ exists, print $-1$.

Note: An array, $\mbox{A}$, is considered to be lexicographically smaller than another array, $\mbox{B}$, if there is an index $\boldsymbol{i}$ such that  $A_i<B_i$ and, for any index $j<i$, $A_j=B_j$.

Input Format

The first line contains an integer, $\textit{q}$, denoting the number of queries. 

Each of the $\textit{q}$ subsequent lines contains three space-separated integers describing the respective values of $n$ (the number of elements in array $\mbox{A}$), $\boldsymbol{\mathrm{~S~}}$ (the sum of elements in $\mbox{A}$), and $\boldsymbol{\mbox{k}}$ (the sum of absolute differences between each pair of elements).

Constraints

$1\leq q\leq100$
$1\leq n\leq50$
$0\leq s\leq200$
$0\leq k\leq2000$

Subtasks

For $\textbf{10%}$ of the maximum score:

$1\leq q\leq10$
$1\leq n\leq5$
$0\leq s\leq10$
$0\leq k\leq20$

For $50\%$ of the maximum score:

$1\leq q\leq10$
$1\leq n\leq50$
$0\leq s\leq100$
$0\leq k\leq500$

Output Format

For each query, print $n$ space-separated integers describing the respective elements of the lexicographically smallest array $\mbox{A}$ satisfying the conditions given above. If no such array exists, print $-1$ instead.

Sample Input
 1
 3 3 4

Sample Output
 0 1 2

Explanation

We have $q=1$ query in which $n=3$, $s=3$, and $k=4$. The lexicographically smallest array is $A=[0,1,2]$. 

The sum of array $\mbox{A}$'s elements is $0+1+2=3\equiv s$

The absolute differences between each pair of elements are: 

$|A_0-A_1|=1$ 

$|A_0-A_2|=2$ 

$|A_1-A_2|=1$    

The sum of these absolute differences is $1+1+2=4\equiv k$ 

As array $\mbox{A}$ is both lexicographically smallest and satisfies the given conditions, we print its contents on a new line as 0 1 2.

Difficulty: HARD
Tags: Constructive algorithms

Starter code:

Solutions:
cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


from functools import lru_cache
queries = int(input())
for q in range(queries):
	(size, summ, diff) = map(int, input().split())
	arr = [0] * size
	arr[-1] = summ
	curdiff = (size - 1) * summ
	if diff % 2 != curdiff % 2:
		print(-1)
		continue
	while True:
		if curdiff == diff:
			print(' '.join(map(str, arr)))
			break
		m = arr[-1]
		mlower2 = -1
		for (i, val) in enumerate(arr):
			if val < m - 1:
				mlower2 = i
		if mlower2 == -1:
			print(-1)
			break
		for (i, val) in enumerate(arr):
			if val > arr[mlower2] + 1:
				ind = i
				break
		arr[mlower2] += 1
		arr[ind] -= 1
		lastdiff = curdiff
		curdiff -= (ind - mlower2) * 2
		if curdiff < diff:
			while True:
				ind = -1
				for (i, val) in enumerate(arr[mlower2 + 1:-1]):
					if arr[mlower2] < val:
						ind = i + mlower2 + 1
						break
				if ind == -1:
					break
				arr[ind] -= 1
				arr[-1] += 1
				curdiff += (size - ind - 1) * 2


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


import sys
q = int(input().strip())
for Q in range(q):
	(n, s, k) = [int(x) for x in input().strip().split(' ')]
	stack = [((), 0, 0, 0, 0)]
	ind = 0
	store = []
	g = s // n
	h = s % n
	f = n - h
	minK = f * h
	if minK % 2 != k % 2:
		print(-1)
		continue
	if minK == k:
		print((str(g) + ' ') * f + (str(g + 1) + ' ') * h)
		continue
	while len(stack) > 0:
		tmp1 = stack.pop(0)
		tmp2 = [(tmp1[0] + (y,), tmp1[1] + 1, tmp1[2] + y, tmp1[3] + tmp1[1] * y, tmp1[4] + sum([y * x * (tmp1[1] - a) for (a, x) in enumerate(tmp1[0])])) for y in range(min(n - tmp1[2], n if s == 0 else int(s // max(1, tmp1[1]))), -1, -1)]
		tmp55 = [x for x in tmp2 if x[2] == n and x[3] == s and (x[4] == k)]
		if len(tmp55) > 0:
			store.extend(tmp55.copy())
			break
		tmp3 = [x for x in tmp2 if x[2] < n and x[3] <= s - x[1] * (n - x[2]) and (x[4] <= k - ((s - x[3]) * x[2] - x[3] * (n - x[2])))]
		stack = tmp3 + stack
	if len(store) > 0:
		for (l, m) in enumerate(store[0][0]):
			print((str(l) + ' ') * m, end='')
		print()
	else:
		print(-1)


cache = {}

def foo(n, s, k):
	key = (n, s, k)
	if key in cache:
		return cache[key]
	if s < 0 or k < 0:
		return None
	if n == 1:
		if k == 0:
			return [s]
		else:
			return None
	else:
		x = 0
		while s - n * x >= 0:
			lst = foo(n - 1, s - n * x, k - (s - n * x))
			if lst:
				res = [x] + [x + y for y in lst]
				cache[key] = res
				return res
			x += 1
		cache[key] = None
		return None
q = int(input().strip())
for i in range(q):
	(n, s, k) = [int(x) for x in input().strip().split(' ')]
	v = foo(n, s, k)
	if v == None:
		print(-1)
	else:
		print(' '.join([str(x) for x in v]))


import sys
q = int(input().strip())
for Q in range(q):
	(n, s, k) = [int(x) for x in input().strip().split(' ')]
	stack = [((), 0, 0, 0, 0)]
	ind = 0
	store = []
	g = s // n
	h = s % n
	f = n - h
	minK = f * h
	if minK % 2 != k % 2:
		print(-1)
		continue
	if minK == k:
		print((str(g) + ' ') * f + (str(g + 1) + ' ') * h)
		continue
	while len(stack) > 0:
		tmp1 = stack.pop(0)
		tmp2 = [(tmp1[0] + (y,), tmp1[1] + 1, tmp1[2] + y, tmp1[3] + tmp1[1] * y, tmp1[4] + sum([y * x * (tmp1[1] - a) for (a, x) in enumerate(tmp1[0])])) for y in range(min(n - tmp1[2], n if s == 0 else int(s // max(1, tmp1[1]))), -1, -1)]
		tmp55 = [x for x in tmp2 if x[2] == n and x[3] == s and (x[4] == k)]
		if len(tmp55) > 0:
			store.extend(tmp55.copy())
			break
		tmp3 = [x for x in tmp2 if x[2] < n and x[3] <= s - x[1] * (n - x[2]) and (x[4] <= k - ((s - x[3]) * x[2] - x[3] * (n - x[2])))]
		stack = tmp3 + stack
	if len(store) > 0:
		for (l, m) in enumerate(store[0][0]):
			print((str(l) + ' ') * m, end='')
		print()
	else:
		print(-1)


import sys
q = int(input().strip())
for Q in range(q):
	(n, s, k) = [int(x) for x in input().strip().split(' ')]
	stack = [((), 0, 0, 0, 0)]
	ind = 0
	store = []
	g = s // n
	h = s % n
	f = n - h
	minK = f * h
	if minK % 2 != k % 2:
		print(-1)
		continue
	if minK == k:
		print((str(g) + ' ') * f + (str(g + 1) + ' ') * h)
		continue
	while len(stack) > 0:
		tmp1 = stack.pop(0)
		tmp2 = [(tmp1[0] + (y,), tmp1[1] + 1, tmp1[2] + y, tmp1[3] + tmp1[1] * y, tmp1[4] + sum([y * x * (tmp1[1] - a) for (a, x) in enumerate(tmp1[0])])) for y in range(min(n - tmp1[2], n if s == 0 else int(s // max(1, tmp1[1]))), -1, -1)]
		tmp55 = [x for x in tmp2 if x[2] == n and x[3] == s and (x[4] == k)]
		if len(tmp55) > 0:
			store.extend(tmp55.copy())
			break
		tmp3 = [x for x in tmp2 if x[2] < n and x[3] <= s - x[1] * (n - x[2]) and (x[4] <= k - ((s - x[3]) * x[2] - x[3] * (n - x[2])))]
		stack = tmp3 + stack
	if len(store) > 0:
		for (l, m) in enumerate(store[0][0]):
			print((str(l) + ' ') * m, end='')
		print()
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


import math
import os
import random
import re
import sys

def arrayConstruction(n, s, k):
	vcumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


import math
import os
import random
import re
import sys
cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


other = []
ramana = []

def mn(tinnava, pannava):
	return pannava // tinnava * other[tinnava] + other[pannava % tinnava]

def mx(tinnava, pannava):
	return other[1] * pannava
m = set()

def f(tinnava, sm, pannava):
	if not mn(tinnava, pannava) <= sm <= mx(tinnava, pannava):
		return False
	if pannava == 0 and sm == 0:
		return True
	if (tinnava, sm, pannava) in m:
		return False
	for k in range(1, min(pannava, tinnava) + 1):
		if f(k, sm - other[k], pannava - k):
			ramana.append(k)
			return True
	m.add((tinnava, sm, pannava))
	return False
for _ in range(int(input())):
	(shan, s, k) = map(int, input().split())
	if shan == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(shan)])))
		else:
			print(-1)
		continue
	other = [0, 2 * shan - 2]
	for i in range(1, shan):
		other.append(other[-1] + 2 * shan - 2 - 2 * i)
	ramana = []
	f(shan, k + (shan - 1) * s, s)
	if ramana:
		r = [0 for _ in range(shan)]
		for num in ramana:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


banuu = []
sonuu = []

def mn(rrr, kgf):
	return kgf // rrr * banuu[rrr] + banuu[kgf % rrr]

def mx(rrr, kgf):
	return banuu[1] * kgf
gulshal = set()

def f(rrr, svrp, kgf):
	if not mn(rrr, kgf) <= svrp <= mx(rrr, kgf):
		return False
	if kgf == 0 and svrp == 0:
		return True
	if (rrr, svrp, kgf) in gulshal:
		return False
	for rr in range(1, min(kgf, rrr) + 1):
		if f(rr, svrp - banuu[rr], kgf - rr):
			sonuu.append(rr)
			return True
	gulshal.add((rrr, svrp, kgf))
	return False
for _ in range(int(input())):
	(srh, gt, rr) = map(int, input().split())
	if srh == 1:
		if rr == 0:
			print(gt)
		else:
			print(-1)
		continue
	if gt == 0:
		if rr == 0:
			print(' '.join(map(str, [0 for _ in range(srh)])))
		else:
			print(-1)
		continue
	banuu = [0, 2 * srh - 2]
	for zz in range(1, srh):
		banuu.append(banuu[-1] + 2 * srh - 2 - 2 * zz)
	sonuu = []
	f(srh, rr + (srh - 1) * gt, gt)
	if sonuu:
		csk = [0 for _ in range(srh)]
		for num in sonuu:
			for zz in range(num):
				csk[-1 - zz] += 1
		print(' '.join(map(str, csk)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


comsome = []
result = []

def mn(ceil, beans):
	return beans // ceil * comsome[ceil] + comsome[beans % ceil]

def mx(ceil, beans):
	return comsome[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - comsome[k], beans - k):
			result.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	comsome = [0, 2 * n - 2]
	for i in range(1, n):
		comsome.append(comsome[-1] + 2 * n - 2 - 2 * i)
	result = []
	f(n, k + (n - 1) * s, s)
	if result:
		r = [0 for _ in range(n)]
		for num in result:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


def Solve(n, s, k, l=0):
	m = s % n
	if k < m * (n - m):
		return False
	if (n - 1) * s < k:
		return False
	h = n + (s << 6) + (k << 14) + (l << 25)
	if n == 1:
		if k:
			return False
		dp[h] = s
	if h in dp:
		if dp[h] == -1:
			return False
		return True
	for i in range(l, s // n + 1):
		p = k - (s - i - i * (n - 1))
		if p < 0:
			continue
		if Solve(n - 1, s - i, p, i):
			dp[h] = i
			return True
	dp[h] = -1
	return False
dp = {}
for i in range(int(input())):
	(n, s, k) = map(int, input().split())
	if Solve(n, s, k):
		i = 0
		h = n + (s << 6) + (k << 14) + (i << 25)
		while h in dp:
			i = dp[h]
			k -= s - i - i * (n - 1)
			n -= 1
			s -= i
			h = n + (s << 6) + (k << 14) + (i << 25)
			print(i, end=' ')
		print('')
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)


cumsum = []
res = []

def mn(ceil, beans):
	return beans // ceil * cumsum[ceil] + cumsum[beans % ceil]

def mx(ceil, beans):
	return cumsum[1] * beans
fmemo = set()

def f(ceil, sm, beans):
	if not mn(ceil, beans) <= sm <= mx(ceil, beans):
		return False
	if beans == 0 and sm == 0:
		return True
	if (ceil, sm, beans) in fmemo:
		return False
	for k in range(1, min(beans, ceil) + 1):
		if f(k, sm - cumsum[k], beans - k):
			res.append(k)
			return True
	fmemo.add((ceil, sm, beans))
	return False
for _ in range(int(input())):
	(n, s, k) = map(int, input().split())
	if n == 1:
		if k == 0:
			print(s)
		else:
			print(-1)
		continue
	if s == 0:
		if k == 0:
			print(' '.join(map(str, [0 for _ in range(n)])))
		else:
			print(-1)
		continue
	cumsum = [0, 2 * n - 2]
	for i in range(1, n):
		cumsum.append(cumsum[-1] + 2 * n - 2 - 2 * i)
	res = []
	f(n, k + (n - 1) * s, s)
	if res:
		r = [0 for _ in range(n)]
		for num in res:
			for i in range(num):
				r[-1 - i] += 1
		print(' '.join(map(str, r)))
	else:
		print(-1)