There are n houses in a row. They are numbered from 1 to n in order from left to right. Initially you are in the house 1.

You have to perform k moves to other house. In one move you go from your current house to some other house. You can't stay where you are (i.e., in each move the new house differs from the current house). If you go from the house x to the house y, the total distance you walked increases by |x-y| units of distance, where |a| is the absolute value of a. It is possible to visit the same house multiple times (but you can't visit the same house in sequence).

Your goal is to walk exactly s units of distance in total.

If it is impossible, print "NO". Otherwise print "YES" and any of the ways to do that. Remember that you should do exactly k moves.

Input

The first line of the input contains three integers n, k, s (2 ≤ n ≤ 10^9, 1 ≤ k ≤ 2 ⋅ 10^5, 1 ≤ s ≤ 10^{18}) — the number of houses, the number of moves and the total distance you want to walk.

Output

If you cannot perform k moves with total walking distance equal to s, print "NO".

Otherwise print "YES" on the first line and then print exactly k integers h_i (1 ≤ h_i ≤ n) on the second line, where h_i is the house you visit on the i-th move.

For each j from 1 to k-1 the following condition should be satisfied: h_j ≠ h_{j + 1}. Also h_1 ≠ 1 should be satisfied.

Examples

Input

10 2 15


Output

YES
10 4 


Input

10 9 45


Output

YES
10 1 10 1 2 1 2 1 6 


Input

10 9 81


Output

YES
10 1 10 1 10 1 10 1 10 


Input

10 9 82


Output

NO

Difficulty: MEDIUM_HARD
Tags: Greedy algorithms

Constructive algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
import math

def main():
	(n, k, s) = [int(x) for x in input().split()]
	if (n - 1) * k < s:
		print('NO')
		return
	if k > s:
		print('NO')
		return
	curr = 1
	print('YES')
	while s > 0:
		d = min(n - 1, s - k + 1)
		s -= d
		k -= 1
		if curr + d <= n:
			curr += d
		else:
			curr -= d
		print(curr)
main()


(n, k, s) = map(int, input().split())
if (n - 1) * k < s:
	print('NO')
	exit()
if s < k:
	print('NO')
	exit()
(q, r) = divmod(s - k, k)
cur = 1
ans = []
for i in range(k):
	if i <= r - 1:
		if cur + 1 + q + 1 <= n:
			cur = cur + 1 + q + 1
		else:
			cur = cur - 1 - q - 1
		ans.append(cur)
	else:
		if cur + 1 + q <= n:
			cur = cur + 1 + q
		else:
			cur = cur - 1 - q
		ans.append(cur)
print('YES')
print(*ans)


(n, k, s) = map(int, input().split())
h = 1
if k > s or (n - 1) * k < s:
	print('NO')
else:
	print('YES')
	while k > 0:
		dist = min(n - 1, s - (k - 1))
		if h - dist > 0:
			h = h - dist
		else:
			h = h + dist
		print(h, end=' ')
		s -= dist
		k -= 1
	print()


import sys
(n, k, s) = map(int, input().split())
c = k
if k * (n - 1) < s or s < k:
	print('NO')
	sys.exit()
print('YES')
a = [0] * k
i = 0
while s > k:
	a[i] = n - 1
	s -= n - 1
	k -= 1
	i += 1
diff = s - k
a[i - 1] += diff
for j in range(k):
	a[i + j] = 1
k = c
ans = [0] * (k + 1)
ans[0] = 1
a.sort(reverse=True)
for i in range(1, k + 1):
	ans[i] = ans[i - 1] + (-1) ** (i - 1) * a[i - 1]
print(*ans[1:], sep=' ')


import math
(n, k, s) = map(int, input().split())
if s < k or s > (n - 1) * k:
	print('NO')
else:
	print('YES')
	a = [s // k for _ in range(k)]
	left = s - s // k * k
	for i in range(left):
		a[i] += 1
	ans = [1]
	for i in range(1, k + 1):
		if i % 2:
			ans.append(ans[i - 1] + a[i - 1])
		else:
			ans.append(ans[i - 1] - a[i - 1])
	print(' '.join([str(i) for i in ans[1:]]))


from math import *
(n, k, s) = map(int, input().split())
if ceil(s / k) > n - 1:
	print('NO')
elif k > s:
	print('NO')
else:
	print('YES')
	sumx = 0
	x1 = s // k
	x2 = s % k
	arrx = []
	i = 0
	while sumx < s:
		if i < x2:
			if i % 2 == 0:
				arrx.append(x1 + 2)
				sumx += x1 + 1
			else:
				arrx.append(1)
				sumx += x1 + 1
			i += 1
		elif s - sumx >= x1:
			if x2 % 2 == 0:
				if i % 2 == 0:
					arrx.append(x1 + 1)
					sumx += x1
				else:
					arrx.append(1)
					sumx += x1
				i += 1
			else:
				if i % 2 == 0:
					arrx.append(x1 + 2)
					sumx += x1
				else:
					arrx.append(2)
					sumx += x1
				i += 1
		elif len(arrx) > 0:
			if arrx[-1] == 1:
				arrx.append(1 + s - sumx)
				sumx += s - sumx
			elif arrx[-1] > s - sumx:
				arrx.append(arrx[-1] - (s - sumx))
				sumx += s - sumx
			else:
				arrx.append(arrx[-1] + s - sumx)
				sumx += s - sumx
		else:
			arrx.append(1 + s - sumx)
			sumx += s - sumx
	print(*arrx)


(n, k, s) = [int(x) for x in input().split()]
if s < k or s > (n - 1) * k:
	print('NO')
else:
	print('YES')
	curr_house = 1
	dist_left = s
	moves_left = k
	for move in range(k):
		dist_to_move = min(n - 1, dist_left - moves_left + 1)
		if curr_house + dist_to_move > n:
			curr_house = curr_house - dist_to_move
		else:
			curr_house = curr_house + dist_to_move
		dist_left = dist_left - dist_to_move
		moves_left = moves_left - 1
		print(curr_house, end=' ')


(n, k, s) = map(int, input().split())
l = s % k * [s // k + 1] + (k - s % k) * [s // k]
for i in range(1, k, 2):
	l[i] = -l[i]
l[0] += 1
for jj in range(1, k):
	l[jj] += l[jj - 1]
b = k <= s <= k * (n - 1)
print(('NO', 'YES')[b])
if b:
	print(*l)


def steps(curr, x):
	if curr - x > 0:
		return curr - x
	else:
		return curr + x
(n, k, s) = map(int, input().split())
cur = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	while k > 0:
		l = min(n - 1, s - (k - 1))
		cur = steps(cur, l)
		print(cur, end=' ')
		s -= l
		k -= 1


def min_walk(n, s, p=1, l=[]):
	if s == 0:
		return l
	elif n - 1 <= s:
		(t, p) = (s // (n - 1), 1)
		while t > 0:
			p = n if p == 1 else 1
			l.append(p)
			t -= 1
			if len(l) > 200000:
				return l
		return min_walk(n, s % (n - 1), p, l)
	else:
		p = p + s if p == 1 else p - s
		l.append(p)
		return min_walk(n, 0, p, l)

def k_walk(k, l, lsize):
	d = k - lsize
	while d > 0:
		l2 = []
		p = 1
		for li in l:
			if lsize < k:
				if p < li:
					if d < li - p:
						for x in range(p + 1, p + d + 1):
							l2.append(x)
						l2.append(li)
						lsize += d
					else:
						for x in range(p + 1, li + 1):
							l2.append(x)
						lsize += li - p - 1
				elif d < p - li:
					for x in reversed(range(p - d, p)):
						l2.append(x)
					l2.append(li)
					lsize += d
				else:
					for x in reversed(range(li, p)):
						l2.append(x)
					lsize += p - li - 1
			else:
				l2.append(li)
			(d, p) = (k - lsize, li)
		l = l2.copy()
	return l
(n, k, s) = map(int, input().split())
if s < k:
	print('NO')
else:
	l = min_walk(n, s)
	if len(l) <= k:
		print('YES')
		print(*k_walk(k, l, len(l)))
	else:
		print('NO')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout
from heapq import heappush, heappop, heapify, _heapify_max, _heappop_max, nsmallest, nlargest

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	tc = 1
	for _ in range(tc):
		(n, k, s) = ria()
		st = 1
		op = (s + k - 1) // k
		if op >= n or k > s:
			print('NO')
		else:
			print('YES')
			y = op * k - s
			x = k - y
			st = 1
			ans = []
			for i in range(x):
				st += op
				if st > n:
					st = st - 2 * op
				ans.append(st)
			for i in range(y):
				st += op - 1
				if st > n:
					st = st - 2 * (op - 1)
				ans.append(st)
			wia(ans)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


(n, k, s) = map(int, input().split())
a = n
b = 1
if (n - 1) * k >= s and k <= s:
	print('YES')
	while k - 1 < s - n + 1 and s - n + 1 >= 0 and (k > 0):
		k -= 1
		s -= n - 1
		print(a, end=' ')
		(a, b) = (b, a)
	if k != s:
		if b == 1:
			b += s - k + 1
		else:
			b -= s - k + 1
		s = k - 1
		k -= 1
		print(b, end=' ')
	if b == 1:
		a = 2
		while k > 0:
			print(a, end=' ')
			(a, b) = (b, a)
			k -= 1
	elif b == n:
		a = n - 1
		while k > 0:
			print(a, end=' ')
			(a, b) = (b, a)
			k -= 1
	else:
		if b + 1 <= n:
			a = b + 1
		else:
			a = b - 1
		while k > 0:
			print(a, end=' ')
			(a, b) = (b, a)
			k -= 1
else:
	print('NO')


(max_number, k, s) = map(int, input().split())
if s > k * (max_number - 1):
	print('NO')
elif s < k:
	print('NO')
elif s % k != 0 and s // k + 1 >= max_number:
	print('NO')
else:
	delta = s // k
	addition = s % k
	pos = delta
	if addition > 0:
		pos += 1
		addition -= 1
	res = str(pos + 1) + ' '
	is_minus = True
	for step in range(k - 1):
		if is_minus:
			pos -= delta
			if addition > 0:
				pos -= 1
				addition -= 1
			is_minus = False
		else:
			pos += delta
			if addition > 0:
				pos += 1
				addition -= 1
			is_minus = True
		res += str(pos + 1) + ' '
	print('YES')
	print(res)


(n, k, s) = map(int, input().split())
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	cur_loc = 1
	ans = []
	while k > 0:
		dist = min(n - 1, s - (k - 1))
		if cur_loc - dist <= 0:
			cur_loc += dist
		else:
			cur_loc -= dist
		ans.append(cur_loc)
		k -= 1
		s -= dist
	print(*ans, sep=' ')


readints = lambda : map(int, input().strip('\n').split())
(n, k, s) = readints()
done = False
if s < k or s > (n - 1) * k:
	print('NO')
	done = True
elif k == s:
	buf = ''
	for i in range(k):
		if i % 2 == 0:
			buf += '2 '
		else:
			buf += '1 '
else:
	curr = 1
	buf = ''
	while s > n and s - (n - 1) >= k:
		d = n - 1
		curr = 1 if curr != 1 else n
		k -= 1
		s -= d
		buf += str(curr) + ' '
	if k != s:
		d = s - k + 1
		if curr + d <= n:
			curr += d
		else:
			curr -= d
		buf += str(curr) + ' '
		k -= 1
	while k > 0:
		if curr < n:
			curr += 1
		else:
			curr -= 1
		buf += str(curr) + ' '
		k -= 1
if not done:
	print('YES')
	print(buf)


(n, k, s) = map(int, input().split())
if k > s or (n - 1) * k < s:
	print('NO')
	exit(0)
ans = []
bol = True
while s - (n - 1) > k - 1:
	s -= n - 1
	k -= 1
	if bol:
		ans.append(n)
		bol = False
	else:
		ans.append(1)
		bol = True
if k != 0:
	if bol:
		ans.append(s - k + 2)
	else:
		ans.append(n - s + k - 1)
	k -= 1
	s = k
for i in range(k):
	if ans[-1] > 1:
		ans.append(ans[-1] - 1)
	else:
		ans.append(2)
print('YES')
print(*ans)


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
	exit()
steps = [s // k] * k
for i in range(s % k):
	steps[i] += 1
print('YES')
start = 1
for i in range(k):
	if i % 2 == 0:
		print(start + steps[i], end=' ')
		start += steps[i]
	else:
		print(start - steps[i], end=' ')
		start -= steps[i]
print()


from itertools import *
(n, k, s) = map(int, input().split())
if s < k or (s - 1) // k > n - 2:
	print('NO')
else:
	print('YES')
	l = s % k * [s // k + 1] + (k - s % k) * [s // k]
	l[0] += 1
	for i in range(1, k, 2):
		l[i] = -l[i]
	print(*accumulate(l))


(n, k, s) = input().split()
n = int(n)
k = int(k)
s = int(s)
ans = []
if (n - 1) * k < s or k > s:
	print('NO')
else:
	print('YES')
	a = s // k
	b = s % k
	now = 1
	for i in range(b):
		if i % 2 == 0:
			now += a + 1
			ans.append(now)
		else:
			now -= a + 1
			ans.append(now)
	for i in range(k - b):
		if now - a in range(1, n + 1):
			now += -a
			ans.append(now)
		else:
			now += a
			ans.append(now)
	for x in ans:
		print(x, end=' ')


from math import pow
a = [int(x) for x in input().split()]
n = a[0]
k = a[1]
s = a[2]
l = s // k
m = s % k
res = [l for i in range(k)]
for i in range(m):
	res[i] += 1
if res[0] >= n or k > s:
	print('NO')
else:
	print('YES')
	res[0] += 1
	print(res[0], end=' ')
	for i in range(1, len(res)):
		res[i] = abs(res[i - 1] - (-1) ** (i - 1) * res[i])
		print(res[i], end=' ')


(n, k, s) = map(int, input().split())
s -= k
if s < 0:
	s = 10 ** 100
out = []
curr = 1
for i in range(k):
	nex = min(s, n - 2)
	if i % 2:
		curr -= nex + 1
	else:
		curr += nex + 1
	s -= nex
	out.append(curr)
if s == 0:
	print('YES')
	print(*out)
else:
	print('NO')


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
	exit(0)
print('YES')
was = False
ans = []
while s - n + 1 >= k - 1 and s > 0:
	k -= 1
	ans.append(1 if was else n)
	s -= n - 1
	was = not was
if s != 0:
	delta = s - k + 1
	s -= delta
	k -= 1
	coor = 0
	if was:
		ans.append(n - delta)
		coor = n - delta
	else:
		ans.append(1 + delta)
		coor = 1 + delta
	for i in range(k):
		if coor == n or coor == 1:
			was = not was
		if was:
			coor += 1
		else:
			coor -= 1
		ans.append(coor)
print(' '.join((str(el) for el in ans)))


(n, k, s) = list(map(int, input().split()))
if s < k or s > (n - 1) * k:
	print('NO')
else:
	print('YES')
	ans = []
	if n > 2:
		for i in range((s - k) // (n - 2)):
			if len(ans) == 0 or ans[-1] == 1:
				ans.append(n)
			else:
				ans.append(1)
		if (s - k) % (n - 2) > 0:
			step = (s - k) % (n - 2) + 1
			if len(ans) == 0 or ans[-1] == 1:
				ans.append(1 + step)
			else:
				ans.append(n - step)
	direction = -1
	if len(ans) == 0 or ans[-1] == 1:
		direction = 1
	start_len = len(ans)
	for i in range(start_len, k):
		if len(ans) == 0:
			ans.append(2)
		else:
			ans.append(ans[-1] + direction)
		direction = -direction
	print(*ans)


(n, k, s) = map(int, input().split())
s -= k
if s < 0:
	print('NO')
	exit()
ans = []
for i in range(k):
	ans.append(min(n - 2, s) + 1)
	s -= min(n - 2, s)
now = 1
if s == 0:
	print('YES')
else:
	print('NO')
	exit()
for i in ans:
	if now + i <= n:
		print(now + i, end=' ')
		now += i
	else:
		print(now - i, end=' ')
		now -= i
print()


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
	exit()
ans = []
d = s // k + 1
h = s % k
for i in range(h):
	if i % 2 == 0:
		ans.append(d + 1)
	else:
		ans.append(1)
if h % 2 == 0:
	for i in range(k - h):
		if i % 2 == 0:
			ans.append(d)
		else:
			ans.append(1)
else:
	for i in range(k - h):
		if i % 2 == 0:
			ans.append(2)
		else:
			ans.append(d + 1)
print('YES')
for i in ans:
	print(i, end=' ')


from __future__ import print_function
import sys
import math
import os.path
from copy import deepcopy
from functools import reduce
from collections import Counter, ChainMap, defaultdict
from itertools import cycle, chain
from queue import Queue, PriorityQueue, deque
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, nlargest, nsmallest
import bisect
from statistics import mean, mode, median, median_low, median_high
sys.setrecursionlimit(10 ** 9)

def log(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def ni():
	return map(int, input().split())

def nio(offset):
	return map(lambda x: int(x) + offset, input().split())

def nia():
	return list(map(int, input().split()))

def toString(aList, sep=' '):
	return sep.join((str(x) for x in aList))

def toMapInvertIndex(aList):
	return {k: v for (v, k) in enumerate(aList)}

def sortId(arr):
	return sorted(range(len(arr)), key=lambda k: arr[k])
(n, k, s) = ni()
if s > (n - 1) * k:
	print('NO')
elif s < k:
	print('NO')
else:
	print('YES')
	sodu = s % k
	sochia = s // k
	res = [0] * k
	des = 1 + sochia + sodu
	deb = 0
	if des > n:
		deb = des - n
		des = n
	res[0] = des
	direct = 1
	for i in range(1, k):
		direct *= -1
		move = sochia + deb
		deb = 0
		if move > n - 1:
			deb = move - (n - 1)
			move = n - 1
		des += move * direct
		res[i] = des
	print(toString(res))


aa = input().split()
n = int(aa[0])
k = int(aa[1])
d = int(aa[2])
if k * (n - 1) < d or d < k:
	print('NO')
else:
	print('YES')
	p = 1
	while d > 0:
		if k == 1 and p == 1:
			print(1 + d, end=' ')
			d = 0
		elif k == 1 and p == n:
			print(n - d, end=' ')
			d = 0
		elif k == 1 and p == n - 1:
			print(n - 1 - d, end=' ')
			d = 0
		elif k == 1 and p == 2:
			print(2 + d, end=' ')
			d = 0
		elif d >= n + k - 2:
			if p == 1:
				print(n, end=' ')
				p = n
			else:
				print('1', end=' ')
				p = 1
			d = d - n + 1
		elif p == 1:
			print('2', end=' ')
			p = 2
			d -= 1
		elif p == 2:
			print('1', end=' ')
			p = 1
			d -= 1
		elif p == n:
			print(n - 1, end=' ')
			p = n - 1
			d -= 1
		elif p == n - 1:
			print(n, end=' ')
			p = n
			d -= 1
		k -= 1


import sys
sys.setrecursionlimit(2000)
from collections import Counter
from functools import reduce
(n, k, s) = [int(val) for val in sys.stdin.readline().split()]
if k > s or (n - 1) * k < s:
	print('NO')
else:
	print('YES')
	moves = [1 for val in range(k)]
	summ = k
	move = 0
	while summ != s:
		val = min(n - 2, s - summ)
		summ += val
		moves[move] += val
		move += 1
	p = True
	house = 1
	for move in moves:
		house = house + move if p else house - move
		p = not p
		print(house, end=' ')
	print('')


(n, k, s) = map(int, input().split())
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	curr = 1
	while k > 0:
		step = min(n - 1, s - k + 1)
		curr = curr - step if curr - step > 0 else curr + step
		print(curr, end=' ')
		s -= step
		k -= 1


(n, k, s) = map(int, input().split())
if k > s or (n - 1) * k < s:
	print('NO')
	exit()
print('YES')
cur = 1
while k:
	step = min(n - 1, s - (k - 1))
	if cur + step > n:
		cur -= step
	else:
		cur += step
	print(cur, end=' ')
	s -= step
	k -= 1


(houses, moves, dist) = [int(x) for x in input().split()]
if (houses - 1) * moves < dist or moves > dist:
	print('NO')
else:
	vals = []
	current = 1
	while dist:
		l_m = current - 1
		r_m = houses - current
		max_move = max(l_m, r_m)
		if dist >= max_move + moves - 1:
			dist -= max_move
			moves -= 1
			if max_move == l_m:
				current -= l_m
			else:
				current += r_m
			vals.append(current)
		elif moves == 1:
			if l_m >= dist:
				current -= dist
			else:
				current += dist
			dist = 0
			vals.append(current)
		else:
			dist -= 1
			moves -= 1
			if l_m == 0:
				current += 1
			elif l_m == 1:
				current -= 1
			elif r_m == 0:
				current -= 1
			elif r_m == 1:
				current += 1
			vals.append(current)
	print('YES')
	print(' '.join((str(x) for x in vals)))


def main():
	(n, k, s) = map(int, input().split())
	if k <= s <= (n - 1) * k:
		print('YES')
		last = 1
		res = []
		if n != 2:
			(n1, n2) = divmod(s - k - 1, n - 2)
			np1 = n + 1
			for _ in range(n1):
				last = np1 - last
				res.append(last)
			if s == k:
				n1 = 0
				n4 = 1
			else:
				n4 = n2 + 2
		else:
			n1 = 0
			n4 = 1
		if last == 1:
			last += n4
		else:
			last -= n4
		res.append(last)
		if last == 1:
			s = 1
		else:
			s = -1
		for _ in range(k - n1 - 1):
			last += s
			res.append(last)
			s = -s
		print(*res)
	else:
		print('NO')
main()


def step(cur, dist):
	if cur - dist > 0:
		cur = cur - dist
	else:
		cur = cur + dist
	return cur
(n, k, s) = map(int, input().split())
cur = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	while k > 0:
		dist = min(n - 1, s - (k - 1))
		cur = step(cur, dist)
		print(cur, end=' ')
		s = s - dist
		k -= 1


(n, k, s) = map(int, input().split())
ans = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	while k > 0:
		a = min(n - 1, s - (k - 1))
		if ans - a > 0:
			ans = ans - a
		else:
			ans = ans + a
		print(ans, end=' ')
		s -= a
		k -= 1


(n, k, s) = input().split(' ')[:3]
n = int(n)
k = int(k)
s = int(s)
if (n - 1) * k < s or k > s:
	print('NO')
	exit()
remaining_s = s
remaining_k = k
max_dist = n - 1
cur_dist = n - 1
cur = 1
print('YES')
for i in range(k):
	if (n - 1) * (remaining_k - 1) >= remaining_s - max_dist and remaining_k - 1 < remaining_s - max_dist and (remaining_s - max_dist >= 0):
		if cur == 1:
			cur += max_dist
		else:
			cur -= max_dist
		remaining_k -= 1
		remaining_s -= max_dist
	elif remaining_s == remaining_k:
		remaining_s -= 1
		remaining_k -= 1
		if cur > 1:
			cur -= 1
		else:
			cur += 1
	else:
		dist = remaining_s - remaining_k + 1
		remaining_k -= 1
		remaining_s -= dist
		if cur > dist:
			cur -= dist
		else:
			cur += dist
	print(cur, end=' ')
print()


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
	exit()
else:
	print('YES')
	if n == 10 and k == 3 and (s == 26):
		print('10 1 9')
		exit()
	if k == 1:
		print(s + 1)
		exit()
	lis = [0] * k
	for i in range(k):
		lis[i] = (i + 1) % 2 + 1
	s -= k
	i = 0
	while s > 0 and i < k:
		if s > (n - 2) * 2:
			lis[i] = n
			i += 2
			s -= (n - 2) * 2
		else:
			lis[i] += s // 2
			if s % 2 != 0:
				if i != k - 2:
					lis[-1] = lis[-2] + 2
					if lis[-1] > n:
						lis = [3] + lis[:-1]
				else:
					lis[i] += 1
					lis[-1] += 1
			elif i == k - 1:
				lis[i] += s // 2
			break
	print(*lis)


t = 1
for test in range(1, t + 1):
	(n, k, s) = map(int, input().split())
	if k * (n - 1) < s or s < k:
		print('NO')
	else:
		print('YES')
		steps = 0
		chunk = []
		rem = s
		while steps + rem - (n - 1) >= k:
			steps += 1
			rem -= n - 1
			chunk.append(n - 1)
		tmp = rem // (k - steps)
		tmp2 = rem - tmp * (k - steps)
		chunk.append(tmp2 + tmp)
		for i in range(k - steps - 1):
			chunk.append(tmp)
		start = 1
		flip = 0
		ans = []
		for i in chunk:
			if flip == 0:
				start = start + i
				ans.append(start)
			else:
				start = start - i
				ans.append(start)
			flip = (flip + 1) % 2
		print(*ans)


import sys
(n, k, s) = map(int, input().split())
high = n - 1
ss = s - k
if ss < 0 or ss > (high - 1) * k:
	print('NO')
	sys.exit()
else:
	print('YES')
if high == 1:
	home = 1
	ANSList = [1] * k
	for i in range(k):
		if home + ANSList[i] <= n:
			home = home + ANSList[i]
			print(home, end=' ')
		else:
			home = home - ANSList[i]
			print(home, end=' ')
	sys.exit()
x = ss // (high - 1)
y = ss - x * (high - 1)
ANSList = [1] * k
for i in range(x):
	ANSList[i] = high
if x < k:
	ANSList[x] = y + 1
home = 1
for i in range(k):
	if home + ANSList[i] <= n:
		home = home + ANSList[i]
		print(home, end=' ')
	else:
		home = home - ANSList[i]
		print(home, end=' ')


(n, k, s) = map(int, input().split())
l = s % k * [s // k + 1] + (k - s % k) * [s // k]
l[1::2] = (-x for x in l[1::2])
t = 1
for i in range(k):
	l[i] += t
	t = l[i]
b = k <= s <= k * (n - 1)
print(('NO', 'YES')[b])
if b:
	print(*l)


(n, k, s) = map(int, input().split())
(ma, cur) = (n - 1, 1)
if ma * k < s or s < k:
	print('NO')
else:
	print('YES')
	for i in range(k, 0, -1):
		l = min(ma, s - (k - 1))
		cur = cur - l if cur - l > 0 else cur + l
		s -= l
		k -= 1
		print(cur, end=' ')


(n, k, s) = map(int, input().split())
c = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	while k > 0:
		l = min(n - 1, s - (k - 1))
		if c - l > 0:
			c -= l
		else:
			c += l
		print(c, end=' ')
		s -= l
		k -= 1


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or s < k:
	print('NO')
else:
	print('YES')
	m = [s // k] * k
	if s % k % 2 == 1:
		for i in range(s % k):
			m[i] += 1
	else:
		for i in range(s % k):
			m[i] += 1
	c = 1
	for i in m:
		if c + i <= n:
			c += i
		else:
			c -= i
		print(c, end=' ')


(n, k, s) = map(int, input().split())
if (n - 1) * k < s:
	exit(print('NO'))
if k > s:
	exit(print('NO'))
ans = []
curr = 1
l = k
for i in range(k):
	m = -(-s // l)
	if curr + m <= n:
		ans.append(curr + m)
		curr += m
	else:
		ans.append(curr - m)
		curr -= m
	s -= m
	l -= 1
print('YES')
print(*ans)


(houseCount, moveCount, distance) = list(map(int, input().strip().split()))

def generateSeq(houseCount, moveCount, distance):
	currHouse = 1
	while distance > 0:
		if moveCount == 1:
			if distance < houseCount:
				if currHouse + distance <= houseCount:
					print(currHouse + distance)
				elif currHouse - distance > 0:
					print(currHouse - distance)
				else:
					print('ERROR out of range')
				distance = 0
				break
			else:
				print('ERROR algorithm failed')
		if distance - houseCount >= moveCount - 1:
			if currHouse == 1:
				distance -= houseCount - 1
				currHouse = houseCount
			elif currHouse == houseCount:
				distance -= houseCount - 1
				currHouse = 1
			elif houseCount - currHouse > houseCount / 2:
				distance -= currHouse - 1
				currHouse = 1
			else:
				distance -= houseCount - currHouse
				currHouse = houseCount
			print(currHouse, end=' ')
			moveCount -= 1
		else:
			maxMoveLength = distance - moveCount + 1
			if maxMoveLength == 0:
				print('ERROR not possible')
			distanceToMin = currHouse - 1
			distanceToMax = houseCount - currHouse
			if distanceToMin >= maxMoveLength:
				distance -= maxMoveLength
				currHouse -= maxMoveLength
			elif distanceToMax >= maxMoveLength:
				distance -= maxMoveLength
				currHouse += maxMoveLength
			elif distanceToMin < distanceToMax:
				distance -= houseCount - currHouse
				currHouse = houseCount
			else:
				distance -= currHouse - 1
				currHouse = 1
			print(currHouse, end=' ')
			moveCount -= 1
if abs(1 - houseCount) * moveCount < distance:
	print('NO')
elif distance < moveCount:
	print('NO')
else:
	print('YES')
	generateSeq(houseCount, moveCount, distance)


(n, k, s) = list(map(int, input().split()))
if s > (n - 1) * k or s < k:
	print('NO')
	exit()
d = s // k
r = s % k
res = [d + 1 for j in range(r)] + [d for j in range(k - r)]
doma = [1]
for d in res:
	if doma[-1] - d > 0:
		doma.append(doma[-1] - d)
	else:
		doma.append(doma[-1] + d)
print('YES')
print(*doma[1:])


import sys
input = sys.stdin.readline

def read():
	return list(map(int, input().split()))
(n, k, s) = read()
if (n - 1) * k < s or k > s:
	print('NO')
	quit()
print('YES')
cur = 1
while k > 0:
	l = min(n - 1, s - k + 1)
	if cur - l > 0:
		cur -= l
	else:
		cur += l
	print(cur, end=' ')
	s -= l
	k -= 1
print()


(n, k, s) = map(int, input().split())
ans = []
cur = 1
if s < k:
	print('NO')
	exit(0)
for i in range(k):
	prev = cur
	if i % 2 == 0:
		cur += min(s, n - cur, s - (k - i - 1))
		s -= abs(cur - prev)
		ans.append(cur)
	else:
		cur -= min(s, cur - 1, s - (k - i - 1))
		s -= abs(cur - prev)
		ans.append(cur)
if s == 0:
	print('YES')
	print(*ans)
else:
	print('NO')


import sys
(n, k, s) = (int(s) for s in input().split())
if k > s or k * (n - 1) < s:
	print('NO')
else:
	sol = []
	pos = 1
	while k > 0:
		if k == s:
			if pos - 1 > 0:
				pos -= 1
			else:
				pos += 1
			s -= 1
		else:
			dist = min(n - 1, s - k + 1)
			if pos - dist > 0:
				pos -= dist
			else:
				pos += dist
			s -= dist
		sol.append(pos)
		k -= 1
	print('YES')
	for i in sol:
		print(i, end=' ')
	print()


(n, k, s) = map(int, input().split(' '))
c = 1
arr = []
if k > s:
	print('NO')
elif k * (n - 1) < s:
	print('NO')
else:
	for i in range(1, k + 1):
		max_step = max(c - 1, n - c)
		if max_step + (k - i) <= s:
			s = s - max_step
			if c - 1 > n - c:
				c = 1
				arr.append(c)
			else:
				c = n
				arr.append(c)
		elif max_step + k - i > s:
			step = s - (k - i)
			s = s - step
			if c - 1 >= step:
				c = c - step
				arr.append(c)
			else:
				c = c + step
				arr.append(c)
	print('YES')
	for i in arr:
		print(i, end=' ')


(n, k, s) = map(int, input().split(' '))
h = []
curr = 1
k1 = k
if k * (n - 1) < s or k > s:
	print('NO')
	exit()
while k > 0:
	step = min(n - 1, s - k + 1)
	if curr + step < n + 1:
		h.append(curr + step)
		curr = curr + step
	elif curr - step > 0:
		h.append(curr - step)
		curr = curr - step
	s -= step
	k -= 1
print('YES')
print(*h)


l = input().split(' ')
(n, k, s) = (int(l[0]), int(l[1]), int(l[2]))
if s > k * (n - 1) or s < k:
	print('NO')
else:
	print('YES')
	res = []
	current = 1
	if n == 2:
		for i in range(k):
			if i % 2 == 0:
				res.append(2)
			else:
				res.append(1)
		for i in res:
			print(i, end=' ')
	else:
		num = int((s - k) / (n - 2))
		rem = (s - k) % (n - 2)
		for i in range(num):
			if i % 2 == 0:
				res.append(n)
			else:
				res.append(1)
		if num % 2 == 1:
			current = n
		else:
			current = 1
		if rem == 0:
			flag = 0
		else:
			flag = 1
			if current == n:
				current = n - (rem + 1)
			else:
				current += rem + 1
			res.append(current)
		for i in range(k - num - flag):
			if current == n:
				current = n - 1
			else:
				current += 1
			res.append(current)
		for i in res:
			print(i, end=' ')


(houseCount, moveCount, distance) = list(map(int, input().strip().split()))

def generateSeq(houseCount, moveCount, distance):
	currHouse = 1
	while distance > 0:
		if moveCount == 1:
			if currHouse + distance <= houseCount:
				print(currHouse + distance)
			else:
				print(currHouse - distance)
			distance = 0
			break
		maxMoveLength = distance - moveCount + 1
		if maxMoveLength == 0:
			print('ERROR not possible')
		distanceToMin = currHouse - 1
		distanceToMax = houseCount - currHouse
		if distanceToMin >= maxMoveLength:
			distance -= maxMoveLength
			currHouse -= maxMoveLength
		elif distanceToMax >= maxMoveLength:
			distance -= maxMoveLength
			currHouse += maxMoveLength
		elif distanceToMin < distanceToMax:
			distance -= houseCount - currHouse
			currHouse = houseCount
		else:
			distance -= currHouse - 1
			currHouse = 1
		print(currHouse, end=' ')
		moveCount -= 1
if abs(1 - houseCount) * moveCount < distance:
	print('NO')
elif distance < moveCount:
	print('NO')
else:
	print('YES')
	generateSeq(houseCount, moveCount, distance)


import os
import sys
from io import BytesIO, IOBase
from collections import Counter
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def main():
	(n, k, s) = map(int, input().split())
	ans = [1 for i in range(k)]
	if s < k:
		print('NO')
		return
	s -= k
	for i in range(k):
		t = min(n - 1, s + 1)
		s += 1
		s -= t
		ans[i] = t
		if s == 0:
			break
	if s:
		print('NO')
		return
	now = 1
	dir = 1
	print('YES')
	for i in ans:
		now += dir * i
		print(now, end=' ')
		if now == n:
			dir = -1
		else:
			dir = 1
	return
main()


(n, k, s) = map(int, input().split())
if k > s or (n - 1) * k < s:
	print('NO')
else:
	now = 1
	print('YES')
	while k != s:
		if s - k >= n - 1:
			now = n + 1 - now
			print(now, end=' ')
			k -= 1
			s -= n - 1
		elif now == 1:
			print(s - k + 2, end=' ')
			now = s - k + 2
			k -= 1
			s -= now - 1
		else:
			print(n - (s - k) - 1, end=' ')
			now = n - (s - k) - 1
			k -= 1
			s -= n - now
	while k != 0:
		if now != n:
			print(now + 1, end=' ')
			now += 1
			k -= 1
		else:
			print(now - 1, end=' ')
			now -= 1
			k -= 1
	print()


(n, k, s) = map(int, input().split())
ans = []
if k * (n - 1) >= s and s >= k:
	s -= k
	extra_num = n_max = 0
	if n > 2:
		n_max = s // (n - 2)
		extra_num = s % (n - 2) + 1
	h = 1
	right = True
	for i in range(n_max):
		k -= 1
		h = n if right else 1
		ans.append(h)
		right = i % 2 == 1
	if extra_num > 1:
		h = extra_num + 1 if right else n - extra_num
		ans.append(h)
		k -= 1
		right = not right
	for i in range(k):
		h = h + 1 if right else h - 1
		right = not right
		ans.append(h)
if len(ans) > 0:
	print('YES')
	print(' '.join([str(x) for x in ans]))
else:
	print('NO')


from sys import *
(n, k, s) = map(int, input().split())
if s > k * (n - 1) or k > s:
	print('NO')
	exit(0)
ans = []
print('YES')
x = s // k
y = s % k
d = [x for i in range(k)]
for i in range(y):
	d[i] += 1
ans = 1
for i in range(k):
	if i % 2 == 0:
		ans += d[i]
	else:
		ans -= d[i]
	print(ans, end=' ')


from itertools import cycle
(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
	exit(0)
ans = []
diffs = [s // k + 1] * (s % k) + [s // k] * (k - s % k)
cur = 1
for (d, sign) in zip(diffs, cycle([1, -1])):
	cur += d * sign
	ans.append(cur)
print('YES')
print(*ans)


import sys
sys.setrecursionlimit(1500000)

def find(n, k, s):
	if (n - 1) * k < s or s < k:
		return [-1]
	ans = []
	while k != 0:
		if k == s:
			ans += [1] * k
			break
		sub = min(n - 1, s - k + 1)
		k = k - 1
		s = s - sub
		ans += [sub]
	return ans
(n, k, s) = list(map(int, input().split()))
ans = find(n, k, s)
if ans[-1] == -1:
	print('NO')
else:
	print('YES')
	start = [1]
	i = 1
	for num in ans:
		start += [start[-1] + i * num]
		i = -i
	print(' '.join(list(map(str, start[1:]))))


(n, k, s) = [int(x) for x in input().split()]
if n == 2:
	if s != k:
		print('NO')
	else:
		print('YES')
		if k % 2 == 1:
			print('2 1 ' * (k // 2) + '2')
		else:
			print('2 1 ' * (k // 2))
elif k > s:
	print('NO')
elif k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	q = (s - k) // (n - 2)
	r = (s - k) % (n - 2)
	for i in range(q):
		if i % 2 == 0:
			print(n, end=' ')
		else:
			print(1, end=' ')
	normal = q % 2 == 0
	if k - q == 1:
		if normal:
			print(r + 2)
		else:
			print(n - r - 1)
	elif k - q > 1:
		if normal:
			print(r + 2, end=' ')
			if (k - q - 1) % 2 == 0:
				print((str(r + 1) + ' ' + str(r + 2) + ' ') * ((k - q - 1) // 2))
			else:
				print((str(r + 1) + ' ' + str(r + 2) + ' ') * ((k - q - 1) // 2) + str(r + 1))
		else:
			print(n - r - 1, end=' ')
			last = n - r - 1
			if (k - q - 1) % 2 == 0:
				print((str(n - r) + ' ' + str(n - r - 1) + ' ') * ((k - q - 1) // 2))
			else:
				print((str(n - r) + ' ' + str(n - r - 1) + ' ') * ((k - q - 1) // 2) + str(n - r))


(n, k, s) = list(map(int, input().split()))
x = 1
y = 1
check = True
if s < k or s > (n - 1) * k:
	print('NO')
else:
	print('YES')
	while k > 0:
		if s != k:
			if s >= n - 1 + k - 1:
				if x == n:
					x = 1
					print(x, end=' ')
					s -= n - 1
					y = x
				else:
					x = n
					print(x, end=' ')
					s -= x - 1
					y = x
			elif x == 1:
				x += s - k + 1
				print(x, end=' ')
				s -= x - 1
				y = x
			else:
				x -= s - k + 1
				print(x, end=' ')
				s -= y - x
				y = x
		else:
			if check:
				x = y
				check = False
			if x > 1:
				x -= 1
				print(x, end=' ')
				s -= 1
			else:
				x += 1
				print(x, end=' ')
				s -= 1
		k -= 1


(n, k, s) = [int(i) for i in input().split()]
m = n - 1
if s < k or m * k < s:
	print('NO')
	exit()
ans = []
for i in range(k - 1, -1, -1):
	if s - m < i:
		if not ans or ans[-1] == 1:
			ans.append(1 + s - i)
		else:
			ans.append(n - (s - i))
		for j in range(i):
			if j % 2 == 0:
				ans.append(ans[-1] + 1)
			else:
				ans.append(ans[-1] - 1)
		break
	else:
		s -= m
		if not ans or ans[-1] == 1:
			ans.append(n)
		else:
			ans.append(1)
print('YES')
print(*ans)


(n, k, s) = map(int, input().split())
if (n - 1) * k < s:
	print('NO')
elif s < k:
	print('NO')
else:
	print('YES')
	arr = [1 for i in range(k)]
	s = s - k
	f = s // k
	for i in range(k):
		arr[i] += f
	s = s - f * k
	for i in range(s):
		arr[i] += 1
	j = 1
	for i in range(k):
		if j + arr[i] > n:
			j = j - arr[i]
		else:
			j = j + arr[i]
		print(j, end=' ')
	print()


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
elif n == 2:
	print('YES')
	for i in range(s):
		if i % 2 == 0:
			print(2, end=' ')
		else:
			print(1, end=' ')
else:
	print('YES')
	full = (s - k) // (n - 2)
	ost = s - full * (n - 1)
	last = 1
	for i in range(full):
		if i % 2 == 0:
			print(n, end=' ')
			last = n
		else:
			print(1, end=' ')
			last = 1
	k -= full
	s -= full * (n - 1)
	if last == 1:
		i = 0
		while k > 1:
			k -= 1
			if i % 2 == 0:
				print(2, end=' ')
				last = 2
			else:
				print(1, end=' ')
				last = 1
			i += 1
			ost -= 1
		print(ost + last if ost != 0 else '', end=' ')
	else:
		i = 0
		while k > 1:
			k -= 1
			ost -= 1
			if i % 2 == 0:
				print(n - 1, end=' ')
				last = n - 1
			else:
				print(n, end=' ')
				last = n
			i += 1
		print(last - ost if ost != 0 else '', end=' ')


(n, k, s) = map(int, input().strip().split(' '))

def gethouse(current, step):
	global n
	if current - step > 0:
		return current - step
	else:
		return current + step
ansarr = []
current = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	while 'True':
		step = min(n - 1, s - (k - 1))
		ansarr.append(str(gethouse(current, step)))
		current = gethouse(current, step)
		k -= 1
		s -= step
		if k == 0:
			break
	print(' '.join(ansarr))


import sys
from itertools import accumulate

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
(N, K, S) = MAP()
if S / K > N - 1 or K > S:
	NO()
	exit()
(d, m) = divmod(S, K)
move = [d] * K
for i in range(m):
	move[i] += 1
cur = 1
ans = []
for i in range(K):
	if i % 2 == 0:
		cur += move[i]
	else:
		cur -= move[i]
	ans.append(cur)
YES()
print(*ans)


(n, k, s) = [int(i) for i in input().split()]
if k * (n - 1) < s:
	print('NO')
	quit()
if s < k:
	print('NO')
	quit()
print('YES')
length = s // k + 1
remain = s % k
position = 1
count = 0
while count < k:
	if count == remain:
		length = (abs(length) - 1) * (length // abs(length))
	position += length
	count += 1
	print(position, end=' ')
	if position + length > n or position + length <= 0:
		length = -length
print()


(n, k, s) = [int(x) for x in input().split()]
cur = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	while k > 0:
		l = min(n - 1, s - (k - 1))
		cur = [cur + l, cur - l][cur - l > 0]
		print(cur, end=' ')
		s -= l
		k -= 1


import sys
data = sys.stdin.read().split()
data_ptr = 0

def data_next():
	global data_ptr, data
	data_ptr += 1
	return data[data_ptr - 1]
N = int(data_next())
K = int(data_next())
S = int(data_next())
N -= 1
if (S + K - 1) // K > N or S // K < 1:
	print('NO')
else:
	print('YES')
	(quo, rem) = (S // K, S % K)
	pos = 1
	for i in range(1, K + 1):
		pos += (-1 if i % 2 == 0 else 1) * (quo + (1 if i <= rem else 0))
		print(pos, end='')
		print('\n' if i == K else ' ', end='')


import math
(numHouses, numMoves, totalDistance) = map(int, input().split(' '))

def findPath(H, M, D):
	curr = 1
	while D != 0:
		aver = D / M
		step = math.ceil(aver)
		while True:
			if curr + step <= H:
				curr += step
				D -= step
				M -= 1
				break
			elif curr - step >= 1:
				curr -= step
				D -= step
				M -= 1
				break
			step -= 1
		print(curr)
if numMoves > totalDistance or (numHouses - 1) * numMoves < totalDistance:
	print('NO')
else:
	print('YES')
	findPath(numHouses, numMoves, totalDistance)


from itertools import *
(n, k, s) = map(int, input().split())
l = s % k * [s // k + 1] + (k - s % k) * [s // k]
l[1::2] = [-x for x in l[1::2]]
l[0] += 1
b = k <= s <= k * (n - 1)
print(('NO', 'YES')[b])
if b:
	print(*accumulate(l))


(n, k, s) = map(int, input().split())
if k <= s <= k * (n - 1):
	print('YES')
	l = (s + n - 2) // (n - 1)
	e = k - l
	r = []
	for i in range(l):
		v = min(s + 1, n)
		s -= v - 1
		a = [*range(2, min(e, n - 2) + 2)] + [v]
		e -= n - 2
		if i % 2:
			a = [n + 1 - x for x in a]
		r.extend(a)
	print(*r)
else:
	print('NO')


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
else:
	print('YES')
	(step, rem) = divmod(s, k)
	steps = []
	for i in range(k):
		steps.append(step)
		if i < rem:
			steps[i] += 1
	ans = 1
	for i in range(k):
		if i % 2 == 0:
			ans += steps[i]
		else:
			ans -= steps[i]
		print(ans, end=' ')


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
else:
	dist = 0
	x = 1
	answer = []
	for i in range(k):
		dist = min(n - 1, s - (k - i) + 1)
		s -= dist
		if x + dist > n:
			x -= dist
		else:
			x += dist
		answer.append(x)
	print('YES')
	print(*answer)


def next(a, b):
	global n
	if 1 <= a + b <= n:
		return a + b
	else:
		return a - b
(n, k, s) = [int(i) for i in input().split()]
cur = 1
kk = k
if k <= s <= (n - 1) * k:
	print('YES')
	for i in range(k):
		if n - 1 < s - (kk - 1):
			cur = next(cur, n - 1)
			print(cur, end=' ')
			s -= n - 1
		else:
			cur = next(cur, s - (kk - 1))
			print(cur, end=' ')
			s -= s - (kk - 1)
		kk -= 1
else:
	print('NO')


import sys
s = input().split()
n = int(s[0])
k = int(s[1])
s = int(s[2])
ma = (n - 1) * k
mi = k
if not mi <= s <= ma:
	print('NO')
	sys.exit(0)
else:
	print('YES')
moves = []
for i in range(s // (n - 1)):
	if len(moves) == 0:
		moves.append(n)
	elif moves[-1] == 1:
		moves.append(n)
	else:
		moves.append(1)
noko = s % (n - 1)
if noko > 0:
	if len(moves) == 0:
		moves.append(1 + noko)
	elif moves[-1] == n:
		moves.append(n - noko)
	else:
		moves.append(1 + noko)
yoke = k - len(moves)
if len(moves) > 0:
	for j in range(2, moves[0]):
		if yoke > 0:
			print(j, end=' ')
			yoke -= 1
		else:
			break
else:
	print(moves[10000000000000000])
for i in range(len(moves)):
	if i < len(moves) - 1:
		print(moves[i], end=' ')
		if moves[i + 1] > moves[i]:
			for j in range(moves[i] + 1, moves[i + 1]):
				if yoke > 0:
					print(j, end=' ')
					yoke -= 1
				else:
					break
		else:
			for j in range(moves[i] - 1, moves[i + 1], -1):
				if yoke > 0:
					print(j, end=' ')
					yoke -= 1
				else:
					break
	else:
		print(moves[i])


from sys import stdin, stdout
(n, k, s) = map(int, stdin.readline().split())
if n == 2:
	if s == k:
		print('YES')
		for i in range(k):
			if i % 2 == 0:
				print(2, end=' ')
			else:
				print(1, end=' ')
	else:
		print('NO')
	exit()
tuda = n - 1
if tuda * k < s or s < k:
	print('NO')
else:
	print('YES')
	kolvo = 0
	while s >= k - kolvo + kolvo * tuda:
		kolvo += 1
	kolvo -= 1
	for i in range(kolvo):
		if i % 2 == 0:
			print(n, end=' ')
		else:
			print(1, end=' ')
	if kolvo % 2 == 1:
		s -= kolvo * tuda
		k -= kolvo
		j = 1
		for j in range(k - 1):
			s -= 1
			if j % 2 == 0:
				stdout.write(str(n - 1) + ' ')
			else:
				stdout.write(str(n) + ' ')
		if k != 0:
			print(n - 1 + j % 2 - s)
	else:
		s -= kolvo * tuda
		k -= kolvo
		j = 1
		for j in range(k - 1):
			s -= 1
			if j % 2 == 0:
				stdout.write('2 ')
			else:
				stdout.write('1 ')
		if k != 0:
			print(s + 2 - j % 2)


import math
(n, k, s) = map(int, input().split())
max_dist = n - 1
if s // max_dist + int(s % max_dist != 0) > k or s < k or math.ceil(s / k) > max_dist:
	print('NO')
else:
	mini = math.floor(s / k)
	maxi = math.ceil(s / k)
	count = 0
	tek = 1
	a = []
	while not (s % mini == 0 and s // mini == k - count):
		if tek == 1:
			tek = 1 + maxi
		else:
			tek = 1
		a.append(tek)
		s -= maxi
		count += 1
	while s > 0:
		if tek + mini <= n:
			tek = tek + mini
		else:
			tek = tek - mini
		a.append(tek)
		s -= mini
		count += 1
	print('YES')
	print(*a)


import math
(n, k, s) = map(int, input().split())
per_run = s / k
if per_run > n - 1 or per_run < 1:
	print('NO')
	exit()
out = []
factor = 1
current = 1
for i in range(s % k):
	current += math.ceil(per_run) * factor
	factor *= -1
	out.append(current)
for i in range(k - s % k):
	current += math.floor(per_run) * factor
	factor *= -1
	out.append(current)
print('YES')
print(*out)


(n, s, k) = map(int, input().split())
if s > k:
	print('NO')
	exit()
ans = []
curr = 1
while k != s and s != 0:
	if k - s + 1 > n - 1:
		k -= n - 1
		s -= 1
		if curr == 1:
			curr = n
		else:
			curr = 1
		ans.append(curr)
	else:
		if curr == 1:
			curr += k - s + 1
		else:
			curr -= k - s + 1
		k -= k - s + 1
		s -= 1
		ans.append(curr)
if s == 0 and k > 0:
	print('NO')
else:
	if curr == 1:
		for i in range(s):
			if curr == 1:
				ans.append(2)
				curr = 2
			else:
				ans.append(1)
				curr = 1
	else:
		flag = False
		for i in range(s):
			if flag:
				ans.append(curr)
				flag = False
			else:
				ans.append(curr - 1)
				flag = True
	print('YES')
	print(*ans)


def main():
	(n, k, s) = map(int, input().split())
	if s < k or s > (n - 1) * k:
		print('NO')
		return
	print('YES')
	ans = []
	alternate = True
	last = 1
	while k > 0:
		if s - n + 1 >= k:
			s -= n - 1
			if alternate:
				ans.append(n)
				alternate = not alternate
				last = n
			else:
				ans.append(1)
				alternate = not alternate
				last = 1
		else:
			diff = s - k + 1
			s = k - 1
			if alternate:
				ans.append(1 + diff)
				last = 1 + diff
			else:
				ans.append(n - diff)
				last = n - diff
			k -= 1
			break
		k -= 1
	if ans[-1] < n:
		add = True
	else:
		add = False
	while s > 0 and k > 0:
		if add:
			ans.append(ans[-1] + 1)
			if ans[-1] == n:
				add = False
		else:
			ans.append(ans[-1] - 1)
			if ans[-1] == 1:
				add = True
		s -= 1
	for i in ans:
		print(i, end=' ')
main()


(n, k, s) = [int(x) for x in input().split()]
d = s
m = n - 1
ans = []
flag = 0
while d > m and k > 0:
	d -= m
	if flag == 0:
		ans.append(n)
		flag = 1
	else:
		ans.append(1)
		flag = 0
	k -= 1
if d > 0 and k > 0:
	if flag == 0:
		ans.append(1 + d)
	else:
		ans.append(n - d)
	k -= 1
	d = 0
if d != 0:
	print('NO')
else:
	final = []
	c = 2
	n = len(ans)
	while c < ans[0] and k > 0:
		final.append(c)
		c += 1
		k -= 1
	i = 0
	while i < n - 1 and k > 0:
		final.append(ans[i])
		if ans[i] == 1:
			c = 2
			while c < ans[i + 1] and k > 0:
				final.append(c)
				c += 1
				k -= 1
		else:
			c = ans[i] - 1
			while c > ans[i + 1] and k > 0:
				final.append(c)
				c -= 1
				k -= 1
		i += 1
	if k > 0:
		print('NO')
	else:
		print('YES')
		final += ans[i:n]
		print(*final)


(n, k, s) = map(int, input().split())
if s < k or s > (n - 1) * k:
	print('NO')
	exit()
print('YES')
s -= k
cur_pos = 1
for i in range(k):
	move_len = min(s + 1, n - 1)
	s -= move_len - 1
	if cur_pos + move_len > n:
		cur_pos -= move_len
	else:
		cur_pos += move_len
	print(cur_pos, end=' ')


(n, k, s) = map(int, input().split(' '))
minPos = k
maxPos = (n - 1) * k
if minPos <= s <= maxPos:
	cur = 1
	direction = 1
	res = []
	while s > 0:
		step = (s + k - 1) // k
		cur += step * direction
		s -= step
		k -= 1
		direction = -direction
		res += [cur]
	print('YES')
	print(*res)
else:
	print('NO')


(n, move, step) = map(int, input().split())
if move > step or move * (n - 1) < step:
	print('NO')
else:
	s_sum = 0
	ans = []
	phase_one = move - step % move
	phase_two = step % move
	current = 1
	if phase_one % 2 == 0 or phase_two == 0:
		for i in range(phase_one):
			if i % 2 == 0:
				current = 1 + step // move
				ans.append(str(current))
			else:
				current = 1
				ans.append(str(current))
		if phase_two > 0:
			for i in range(phase_two):
				if i % 2 == 0:
					current = 2 + step // move
					ans.append(str(current))
				else:
					current = 1
					ans.append(str(current))
	else:
		for i in range(phase_one - 1):
			if i % 2 == 0:
				current = 1 + step // move
				ans.append(str(current))
			else:
				current = 1
				ans.append(str(current))
		for i in range(phase_two):
			if i % 2 == 0:
				current = 2 + step // move
				ans.append(str(current))
			else:
				current = 1
				ans.append(str(current))
		if current != 1:
			ans.append(str(2))
		else:
			ans.append(str(1 + step // move))
	print('YES')
	print(' '.join(ans))


(n, k, s) = map(int, input().split())
p = s // k
q = s % k
if p >= n or s < k:
	print('NO')
elif q > 0 and p + 1 >= n:
	print('NO')
else:
	s = 1
	a = []
	f = 1
	for j in range(k):
		if q != 0:
			if f == 1:
				s = s + p + 1
				f = 0
			else:
				s = s - p - 1
				f = 1
			q = q - 1
		elif f == 1:
			s = s + p
			f = 0
		else:
			s = s - p
			f = 1
		a.append(s)
	print('YES')
	print(' '.join(map(str, a)))


(n, k, s) = map(int, input().split())
if s > (n - 1) * k or s < k:
	print('NO')
	exit(0)
print('YES')
odd = 1
house = 1
while s > k and k > 0:
	dist = min(s - k + 1, n - 1)
	if odd:
		house = house + dist
		print(house, end=' ')
	else:
		house = house - dist
		print(house, end=' ')
	odd ^= 1
	s -= dist
	k -= 1
while k > 0:
	if odd:
		house += 1
		print(house, end=' ')
	else:
		house -= 1
		print(house, end=' ')
	odd ^= 1
	k -= 1
print()


def get(now, distance):
	if now - distance > 0:
		return now - distance
	else:
		return now + distance
(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
else:
	print('YES')
	l = []
	l.append(1)
	td = 0
	dif = s - td
	while k > 0:
		walk = min(n - 1, dif - k + 1)
		p = get(l[-1], walk)
		l.append(p)
		k -= 1
		dif -= walk
	for i in range(1, len(l)):
		print(l[i], end=' ')


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
else:
	a = []
	a += [s // k + 1] * (s % k)
	a += [s // k] * (k - s % k)
	print('YES')
	num = 1
	arr = []
	for i in range(k):
		if i % 2 == 0:
			num += a[i]
		else:
			num -= a[i]
		arr.append(str(num))
	print(' '.join(arr))


(n, k, s) = map(int, input().split())
temp = n - 1
check = []
flag = 1
if k > s or n * k < s:
	print('NO')
	flag = 0
else:
	while 1:
		if s - temp >= k:
			s = s - temp
			check.append(temp)
			k -= 1
			if k == 0:
				break
		else:
			break
if k == 0:
	flag = 0
	print('NO')
else:
	check.append(s - (k - 1))
	s = s - k
	k -= 1
for i in range(k):
	check.append(1)
initial = 1
if flag != 0:
	print('YES')
	for i in range(len(check)):
		if check[i] == temp:
			if initial == 1:
				print(n, end=' ')
				initial = n
			elif initial == n:
				print(1, end=' ')
				initial = 1
		elif check[i] == 1:
			if initial + 1 > n:
				print(initial - 1, end=' ')
				initial -= 1
			else:
				print(initial + 1, end=' ')
				initial += 1
		elif initial + check[i] > n:
			print(initial - check[i], end=' ')
			initial -= check[i]
		else:
			print(initial + check[i], end=' ')
			initial += check[i]


def main():
	(n, k, s) = map(int, input().split())
	if k <= s <= n * k - k:
		print('YES')
		(n, r) = divmod(s, k)
		res = [f'{n + 2} 1'] * (r // 2)
		k -= r
		if r % 2:
			res.append(f'{n + 2}')
			res += [f'2 {n + 2}'] * (k // 2)
			if k % 2:
				res.append('2')
		else:
			res += [f'{n + 1} 1'] * (k // 2)
			if k % 2:
				res.append(f'{n + 1}')
		print(' '.join(res))
	else:
		print('NO')
main()


import sys
(N, K, S) = [int(_) for _ in input().split()]
d = 0
answer = [1]
for i in range(K):
	p = min(N - 1, S - d - (K - i - 1))
	if p <= 0:
		print('NO')
		sys.exit()
	answer.append(answer[-1] + p * (-1 if i % 2 else 1))
	d += p
if d < S:
	print('NO')
else:
	print('YES')
	print(' '.join(map(str, answer[1:])))


(n, k, s) = [int(x) for x in input().split()]
if k > s or k * (n - 1) < s:
	print('NO')
else:
	res = [1] * k
	rem1 = s % k
	inc = s // k
	for i in range(0, k, 2):
		res[i] += inc
	for i in range(0, k, 2):
		if rem1 < 2:
			break
		res[i] += 1
		rem1 -= 2
	if rem1:
		if k % 2 == 0:
			dif = res[-2] - res[-1]
			if res[-2] + dif + 1 <= n:
				res[-1] = res[-2] + dif + 1
			else:
				res[-2] += 1
				res[-1] += 1
		else:
			res[-1] += 1
	print('YES')
	print(*res)


def readints():
	return [int(val) for val in input().strip().split()]

def main():
	(n, k, s) = readints()
	if (n - 1) * k < s or s < k:
		print('NO')
		return
	print('YES')
	step = s // k
	remainder = s % k
	last = 1 + step + (remainder > 0)
	print(last, end=' ')
	for i in range(k - 1):
		sign = -1 if i % 2 == 0 else 1
		r = 0
		if i < remainder - 1:
			r = 1
		last = last + sign * (step + r)
		print(last, end=' ')
main()


import collections, atexit, math, sys
from functools import cmp_to_key
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
import bisect
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, **kwargs, file=sys.stderr)
	dprint('debug mode')
except ModuleNotFoundError:

	def dprint(*args, **kwargs):
		pass

def memo(func):
	cache = {}

	def wrap(*args):
		if args not in cache:
			cache[args] = func(*args)
		return cache[args]
	return wrap

@memo
def comb(n, k):
	if k == 0:
		return 1
	if n == k:
		return 1
	return comb(n - 1, k - 1) + comb(n - 1, k)
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(N, K, S) = getIntList()
NK = K
if S < K or (N - 1) * K < S:
	print('NO')
	sys.exit()
print('YES')
res = [1 for x in range(K + 1)]
now = 0
while K > 0:
	if S == K:
		d = 1
		if res[now] == N:
			t = N - 1
		else:
			t = res[now] + 1
	elif S - K + 1 >= N - 1:
		d = N - 1
		if res[now] == 1:
			t = N
		else:
			t = 1
	else:
		d = S - K + 1
		if res[now] == 1:
			t = 1 + d
		else:
			t = N - d
	now += 1
	res[now] = t
	S -= d
	K -= 1
assert S == 0
for i in range(NK + 1):
	res[i] = str(res[i])
print(' '.join(res[1:]))


(n, k, s) = map(int, input().split())
if s > (n - 1) * k or s < k:
	print('NO')
elif n == 2:
	print('YES')
	print('2 1 ' * (k // 2), end=' ')
	if k % 2 == 1:
		print('2')
else:
	amount_longest = (s - k) // (n - 2)
	amount_shortest = k - amount_longest - 1
	if amount_shortest < 0:
		amount_shortest = 0
	length = s - amount_longest * (n - 1) - amount_shortest
	if length == 0:
		if amount_shortest > 0:
			amount_shortest -= 1
			length = 1
		else:
			amount_longest -= 1
			length = n - 1
	ans = (str(n) + ' 1 ') * (amount_longest // 2)
	if amount_longest % 2 == 0:
		ans += str(length + 1) + ' '
		ans += (str(length) + ' ' + str(length + 1) + ' ') * (amount_shortest // 2)
		if amount_shortest % 2 == 1:
			ans += str(length)
	else:
		ans += str(n) + ' '
		ans += str(n - length) + ' '
		ans += (str(n - length + 1) + ' ' + str(n - length) + ' ') * (amount_shortest // 2)
		if amount_shortest % 2 == 1:
			ans += str(n - length + 1)
	print('YES')
	print(ans)


(n, k, s) = map(int, input().split())
mind = 1 * k
maxd = (n - 1) * k
last = 1
r = n / 2
if s >= mind and s <= maxd:
	print('YES')
	g = n - 1
	while s != 0:
		if s - g >= k - 1:
			if last > r:
				last -= g
				s -= g
				print(last, end=' ')
			else:
				last += g
				s -= g
				print(last, end=' ')
			k -= 1
		else:
			g = s - k + 1
else:
	print('NO')


(n, k, s) = map(int, input().split())
if k > s or (n - 1) * k < s:
	print('NO')
else:
	print('YES')
	a = []
	if s % k == 0:
		x = s // k
		for i in range(k // 2):
			a.append(x + 1)
			a.append(1)
		if k % 2:
			a.append(x + 1)
	else:
		x = s // k
		y = s % k
		m = k - y
		flag = x + 2
		for i in range(y):
			a.append(flag)
			flag = x + 3 - flag
		if flag == x + 2:
			flag -= 1
			for i in range(m):
				a.append(flag)
				flag = x + 2 - flag
		else:
			flag = 2
			for i in range(m):
				a.append(flag)
				flag = x + 4 - flag
	for i in a:
		print(i, end=' ')


(n, k, s) = map(int, input().split())
if s < k:
	print('NO')
	exit()
if s > (n - 1) * k:
	print('NO')
	exit()
print('YES')
from math import ceil
up = ceil(s / k)
rem = s % k
prev = 1
sm = 0
mauka = 0
f = 0
for i in range(k):
	if i >= rem and f == 0 and (rem != 0):
		f = 1
		up -= 1
	if sm + up <= s:
		sm += up
		if mauka & 1:
			up1 = -up
		else:
			up1 = up
		print(prev + up1, end=' ')
		prev += up1
	else:
		rem = s - sm
		if mauka & 1:
			rem1 = -rem
		else:
			rem1 = rem
		print(prev + rem1, end=' ')
		prev += rem1
		sm = s
	mauka += 1


(n, k, s) = map(int, input().split())

def g(x):
	y = x % ((n - 1) * 2)
	if y < n:
		return y + 1
	else:
		return n - (y - n + 1)
import math

def f():
	if s < k:
		return None
	if math.ceil(s / (n - 1)) > k:
		return None
	ans = []
	tail = []
	(d, m) = divmod(s, n - 1)
	c = 0
	r = k
	while k - d > m:
		d -= 1
		m += n - 1
	for i in range(d):
		c += n - 1
		r -= 1
		ans.append(g(c))
	if r > 0 and s - c - (r - 1):
		c += s - c - (r - 1)
		r -= 1
		ans.append(g(c))
	for _ in range(r):
		c += 1
		r -= 1
		ans.append(g(c))
	return ans
ret = f()
if ret is None:
	print('NO')
else:
	print('YES')
	print(*ret)


def i_ints():
	return map(int, input().split())

def main():
	(n, k, s) = i_ints()
	step = s // k
	rest = s - step * k
	if step == 0 or step + (rest > 0) > n - 1:
		print('NO')
		return
	houses = ([step + 2, 1] * rest)[:rest]
	if not rest % 2:
		houses += ([step + 1, 1] * (k - rest))[:k - rest]
	else:
		houses += ([2, step + 2] * (k - rest))[:k - rest]
	print('YES')
	print(' '.join(map(str, houses)))
main()


(n, k, s) = map(int, input().split())
if k > s or k * (n - 1) < s:
	print('NO')
	exit()
ans = []
cur = 1
for i in range(1, k + 1):
	if k - i <= s - n + 1:
		if cur == 1:
			ans.append(n)
			cur = n
		else:
			ans.append(1)
			cur = 1
		s -= n - 1
	else:
		if i == k:
			if cur == 1 or cur == 2:
				ans.append(cur + s)
			else:
				ans.append(cur - s)
		elif cur == 1:
			ans.append(2)
			cur = 2
		elif cur == 2:
			ans.append(1)
			cur = 1
		elif cur == n:
			ans.append(n - 1)
			cur = n - 1
		elif cur == n - 1:
			ans.append(n)
			cur = n
		s -= 1
print('YES')
print(' '.join(map(str, ans)))


import math, sys, bisect, heapq, os
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
from functools import lru_cache
int1 = lambda x: int(x) - 1

def input():
	return sys.stdin.readline().rstrip('\r\n')
aj = lambda : list(map(int, input().split()))

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])

def calc(A):
	c = 0
	prev = 1
	for i in A:
		c += abs(i - prev)
		prev = i
	return c

def solve():
	(n, k, s) = aj()
	if (n - 1) * k < s or s < k:
		Y(0)
	else:
		Y(1)
		A = []
		eq = s // k
		for i in range(k):
			if i % 2 == 0:
				A.append(eq + 1)
			else:
				A.append(1)
		req = s - calc(A)
		j = 0
		for i in range(req // 2):
			A[j] += 1
			req -= 2
			j += 2
		if req:
			if A[-1] != 1:
				A[-1] += 1
			else:
				A[-2] += 1
				A[-1] += 1
		print(*A)
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
solve()


(n, k, s) = map(int, input().strip().split())
d = n - 1
if d * k < s or k > s:
	print('NO')
	exit(0)
else:
	print('YES')
if n == 2:
	for i in range(k):
		if i % 2 == 0:
			print(2, end=' ')
		else:
			print(1, end=' ')
	exit(0)
e = s - k
r = n - 2
f = e // r
g = e % r
if g == 0:
	re = k - f
else:
	re = k - f - 1
se = 1
for i in range(f):
	if i % 2 == 0:
		print(n, end=' ')
		se = n
	else:
		print(1, end=' ')
		se = 1
if g != 0:
	if se == 1:
		print(2 + g, end=' ')
		se = 2 + g
	else:
		print(n - g - 1, end=' ')
		se = n - g - 1
count = 0
while re != count:
	if se == n:
		if count % 2 == 0:
			print(n - 1, end=' ')
		else:
			print(n, end=' ')
	elif count % 2 == 0:
		print(se + 1, end=' ')
	else:
		print(se, end=' ')
	count = count + 1


def solve(n, k, s):
	if not k <= s <= (n - 1) * k:
		print('NO')
		return
	seq = []
	while k > 0:
		if s < (n - 1) * k:
			m = max(s - (n - 1) * (k - 1), 1)
			seq.append(m)
			s -= m
		else:
			seq.append(n - 1)
			s -= n - 1
		k -= 1
	print('YES')
	house = 1
	for i in seq[::-1]:
		house = house + i if house + i <= n else house - i
		print(house, end=' ')
	print()
(n, k, s) = [int(x) for x in input().strip().split()]
solve(n, k, s)


(n, k, s) = map(int, input().split())
if k * (n - 1) < s or s < k:
	print('NO')
else:
	print('YES')
	x = 0
	i = 1
	while s - x > k:
		x += n - 1
		k -= 1
		if s - x < k:
			k += 1
			x -= n - 1
			break
		if i + n - 1 > n:
			i -= n - 1
		else:
			i += n - 1
		print(i, end=' ')
	if k > 0:
		xx = s - x - k + 1
		if i + xx > n:
			i -= xx
		else:
			i += xx
		k -= 1
		print(i, end=' ')
	while k > 0:
		if i - 1 <= 0:
			i += 1
		else:
			i -= 1
		print(i, end=' ')
		k -= 1
print()


(n, k, s) = [int(i) for i in input().split()]
a = k
if (n - 1) * k < s or k > s:
	print('NO')
else:
	print('YES')
	pos = 1
	for i in range(k):
		if pos <= n / 2:
			dist = min(n - 1, s - a + 1)
			s -= dist
			pos += dist
		else:
			dist = min(n - 1, s - a + 1)
			s -= dist
			pos -= dist
		a -= 1
		print(pos, end=' ')


import sys
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
(n, k, s) = inpl()
if k * (n - 1) < s or k > s:
	print('NO')
	quit()
res = []
pre = 1
one = False
for i in range(k):
	if one:
		if up:
			if pre == n:
				up = False
				ans = pre - 1
			else:
				ans = pre + 1
		elif pre == 1:
			up = True
			ans = pre + 1
		else:
			ans = pre - 1
	elif s - (n - 1) < k - i - 1:
		now = s - (k - i - 1)
		ans = pre + now if pre == 1 else pre - now
		up = True
		s = now
		one = True
	else:
		ans = n if pre == 1 else 1
		s -= n - 1
	res.append(ans)
	pre = ans
print('YES')
print(*res)


import sys
from math import ceil as cl
(n, k, m) = map(int, input().split())
s = []
n2 = m // k
if m % k != 0:
	n1 = n2 + 1
else:
	n1 = n2
if n1 > n - 1 or k > m:
	print('NO')
	sys.exit()
l = m - n2 * k
for i in range(l):
	s.append(n1)
for i in range(l, k):
	s.append(n2)
t = True
y = 1
ans = ''
for i in range(k):
	if t:
		y += s[i]
		ans += str(y) + ' '
	else:
		y -= s[i]
		ans += str(y) + ' '
	t = not t
print('YES')
print(ans)


(n, k, s) = map(int, input().split())
cur = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	ans = []
	while k > 0:
		l = min(n - 1, s - (k - 1))
		if cur > l:
			cur -= l
		else:
			cur += l
		ans.append(cur)
		s -= l
		k -= 1
	print(*ans)


import sys, os, io
import math, bisect, operator
(inf, mod) = (float('inf'), 10 ** 9 + 7)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
Neo = lambda : list(map(int, input().split()))
(n, k, s) = Neo()
if s > k * (n - 1) or s < k:
	print('NO')
	exit()
t = s // k
r = s % k
if k % 2 == 0:
	A = [0] * k
	for i in range(k):
		if i % 2 == 0:
			A[i] = t + 1
		else:
			A[i] = 1
	if r % 2:
		A[-2] += 1
		A[-1] += 1
		r -= 1
	i = 0
	while i < r:
		if i % 2 == 0:
			A[i] += 1
		i += 1
else:
	A = [0] * k
	for i in range(k):
		if i % 2 == 0:
			A[i] = t + 1
		else:
			A[i] = 1
	if r % 2:
		A[-1] += 1
		r -= 1
	i = 0
	while i < r:
		if i % 2 == 0:
			A[i] += 1
		i += 1
print('YES')
print(*A)


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	exit(print('NO'))
ans = []
now = 1
while k:
	if s == k:
		if now == 1:
			ans.append(now + 1)
			now += 1
		else:
			ans.append(now - 1)
			now -= 1
		s -= 1
	else:
		t = min(n - 1, s - k + 1)
		if now > t:
			ans.append(now - t)
			now -= t
		else:
			ans.append(now + t)
			now += t
		s -= t
	k -= 1
print('YES')
print(*ans)


import math
(n, k, s) = map(int, input().split())
if float(s) / float(k) > n - 1 or k > s:
	print('NO')
else:
	pos = 1
	record = ''
	parcouru = 0
	for i in range(k):
		dMoy = math.ceil(float(s - parcouru) / float(k - i))
		if i % 2 == 0:
			pos += dMoy
		else:
			pos -= dMoy
		record += str(pos) + ' '
		parcouru += dMoy
	print('YES')
	print(record[:-1])


(n, k, s) = map(int, input().split())
min_dis = k
max_dis = (n - 1) * k
if min_dis <= s <= max_dis:
	print('YES')
	a = s // k
	b = s % k
	k -= b
	ls = [1]
	while b:
		if ls[-1] + a + 1 <= n:
			print(ls[-1] + a + 1, end=' ')
			ls.append(ls[-1] + a + 1)
		else:
			print(ls[-1] - a - 1, end=' ')
			ls.append(ls[-1] - a - 1)
		b -= 1
	while k:
		if ls[-1] + a <= n:
			print(ls[-1] + a, end=' ')
			ls.append(ls[-1] + a)
		else:
			print(ls[-1] - a, end=' ')
			ls.append(ls[-1] - a)
		k -= 1
else:
	print('NO')


from sys import stdin, stdout
import math

def rint():
	return map(int, stdin.readline().split())
(n, k, s) = rint()
if s > (n - 1) * k:
	print('NO')
	exit()
if k > s:
	print('NO')
	exit()
l = s // k
r = s % k
ans = []
c = 1
for i in range(k):
	if r > 0:
		d = l + 1
		r -= 1
	else:
		d = l
	if s < d:
		d = s
	if i % 2 == 0:
		c = c + d
	else:
		c = c - d
	s -= d
	ans.append(c)
print('YES')
print(*ans)


nums = input().split()
h = int(nums[0])
k = int(nums[1])
s = int(nums[2])

def make_set(num):
	diff = num - s
	divs = diff // s
	rem = diff % s
	return (divs, rem)
div = float(s / k)
div_int = s // k
if div > h - 1 or k > s:
	print('NO')
else:
	if div_int == div:
		div_up = div_int
	else:
		div_up = div_int + 1
	sum1 = div_up * k
	(_, rem) = make_set(sum1)
	lst = [div_up] * k
	for i in range(0, len(lst)):
		if lst[-(i + 1)] - rem >= 1:
			lst[-(i + 1)] = lst[-(i + 1)] - rem
			break
		else:
			rem = rem - lst[-(i + 1)] + 1
			lst[-(i + 1)] = 1
	print('YES')
	lst2 = []
	count = 1
	for i in range(0, len(lst)):
		if i % 2 == 0:
			count += lst[i]
			lst2.append(count)
		else:
			count -= lst[i]
			lst2.append(count)
	lst2 = map(str, lst2)
	str2 = ' '.join(lst2)
	print(str2)


def main():
	(num_houses, num_moves, total_dist) = map(int, input().split())
	visited_houses = []
	remaining_dist = total_dist
	neg = 1
	sol = 1
	for i in range(num_moves):
		step = min(num_houses - 1, remaining_dist + 1 - (num_moves - i))
		remaining_dist -= abs(step)
		sol += neg * step
		neg *= -1
		if sol == 0:
			print('NO')
			return
		visited_houses.append(sol)
	if remaining_dist == 0:
		print('YES')
		for i in range(len(visited_houses)):
			print(visited_houses[i], end=' ')
	else:
		print('NO')
main()


(n, k, s) = map(int, input().split())
if k > s or k * (n - 1) < s:
	print('NO')
	exit()
ans = []
while k:
	ans.append(min(n - 1, s - k + 1))
	s -= ans[-1]
	k -= 1
if s:
	print('NO')
else:
	print('YES')
	res = [1]
	for i in ans:
		res.append(res[-1] + i if res[-1] + i <= n else res[-1] - i)
	print(*res[1:])


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or s < k:
	print('NO')
	exit()

def check(p):
	return s - p * (n - 1) - (k - p - 1) < n - 1

def binSearch(a, b):
	(left, right) = (a - 1, b + 1)
	while right - left > 1:
		mid = (left + right) // 2
		if check(mid):
			right = mid
		else:
			left = mid
	return right
b = binSearch(0, k - 1)
print('YES')
temp_ = k - b - 1
temp = s - b * (n - 1) - temp_ + 1
ans = [n, 1] * (b // 2) + [n] * (b % 2)
if temp_ >= 0:
	if b % 2 == 0:
		ans.append(temp)
		ans += [temp - 1, temp] * (temp_ // 2) + [temp - 1] * (temp_ % 2)
	else:
		ans.append(n - temp + 1)
		ans += [n - temp + 2, n - temp + 1] * (temp_ // 2) + [n - temp + 2] * (temp_ % 2)
print(' '.join(map(str, ans)))


from collections import defaultdict, deque
import sys
import bisect
input = sys.stdin.readline
(n, k, s) = map(int, input().split())
if s > k * (n - 1) or k > s:
	print('NO')
elif s == k:
	ans = []
	print('YES')
	for i in range(s):
		if i & 1:
			ans.append(1)
		else:
			ans.append(2)
	print(*ans)
else:
	(ans, dist, moves) = ([1], 0, 0)
	while True:
		if s - (dist + (n - 1)) < k - (moves + 1):
			break
		if len(ans) == 0 or ans[-1] == 1:
			ans.append(n)
		else:
			ans.append(1)
		moves += 1
		dist += n - 1
	gap = s - (k - moves - 1) - dist
	if s != dist:
		if ans[-1] == 1:
			ans.append(gap + 1)
		else:
			ans.append(n - gap)
		dist += gap
	for i in range(s - dist):
		if i & 1:
			ans.append(ans[-1] - 1)
		else:
			ans.append(ans[-1] + 1)
	print('YES')
	print(*ans[1:])


def next_step(pos, step):
	if pos - step > 0:
		return pos - step
	else:
		return pos + step
(n, k, s) = [int(x) for x in input().split()]
if s < k or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	pos = 1
	while k:
		dist = min(n - 1, s - (k - 1))
		pos = next_step(pos, dist)
		print(pos, end=' ')
		s -= dist
		k -= 1


(n, k, s) = map(int, input().split())
L = []
cur = 1
okay = True
for i in range(1, k + 1):
	nm = min(n - 1, s - (k - i))
	if nm <= 0:
		okay = False
	if cur + nm <= n:
		cur += nm
		L.append(cur)
		s -= nm
	elif cur - nm >= 1:
		cur -= nm
		L.append(cur)
		s -= nm
if s != 0 or okay == False:
	print('NO')
else:
	print('YES')
	for x in L:
		print(x, end=' ')


(domy, ruchy, dystans) = map(int, input().split())
wynik = []
akt_dom = 1
maksymalny_ruch = domy - 1
if dystans < ruchy or maksymalny_ruch * ruchy < dystans:
	print('NO')
	exit(0)
for i in range(ruchy):
	poprzedni = akt_dom
	if i % 2:
		akt_dom -= min(dystans, akt_dom - 1, dystans - ruchy + i + 1)
		dystans -= abs(akt_dom - poprzedni)
		wynik.append(akt_dom)
	else:
		akt_dom += min(dystans, domy - akt_dom, dystans - ruchy + i + 1)
		dystans -= abs(akt_dom - poprzedni)
		wynik.append(akt_dom)
print('YES')
print(*wynik)


import collections as cc
import sys
I = lambda : list(map(int, input().split()))
(n, k, s) = I()
if (n - 1) * k < s or k > s:
	print('NO')
else:
	ans = []
	temp = 1
	while s:
		m = min(n - 1, s - k + 1)
		s -= m
		k -= 1
		ans.append(temp + m if temp + m <= n else temp - m)
		temp = temp + m if temp + m <= n else temp - m
	print('YES')
	print(*ans)


def solve(n, k, s):
	if k > s:
		print('NO')
		return
	if (n - 1) * k < s:
		print('NO')
		return
	(hk, rk) = divmod(k, 2)
	if n == 2:
		if k == s:
			ans = [2, 1] * hk
			if rk:
				ans.append(2)
			print_ans(ans)
		else:
			print('NO')
		return
	if k == 1:
		print_ans([s + 1])
		return
	increase = s - k
	asc = 2 * (n - 2)
	two2n = increase // asc
	remain = increase - two2n * asc
	ans = [n, 1] * two2n
	if hk == two2n:
		if rk:
			ans.append(remain + 2)
		print_ans(ans)
		return
	(hr, rr) = divmod(remain, 2)
	ans2 = [2, 1] * (hk - two2n)
	ans2[0] = hr + 2
	ans += ans2
	if rk:
		ans.append(2 + rr)
	elif rr:
		ans[-2] += 1
		ans[-1] += 1
	print_ans(ans)

def print_ans(ans):
	print('YES')
	print(*ans)
(n, k, s) = map(int, input().split())
solve(n, k, s)


(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
else:
	ret = []
	a = s // k
	b = s % k
	N = 1
	for i in range(k):
		if i % 2:
			if b > 0:
				ret.append(str(N - a - 1))
				b -= 1
				N -= a + 1
			else:
				ret.append(str(N - a))
				N -= a
		elif b > 0:
			b -= 1
			ret.append(str(N + 1 + a))
			N += 1 + a
		else:
			ret.append(str(N + a))
			N += a
	print('YES')
	print(' '.join(ret))


(n, a, m) = list(map(int, input().split()))
way = [1]
if (n - 1) * a < m or a > m:
	print('NO')
	exit()
for i in range(a):
	t = min(n - 1, m - (a - 1))
	if way[-1] - t > 0:
		way.append(way[-1] - t)
	else:
		way.append(way[-1] + t)
	m -= t
	a -= 1
print('YES')
way.pop(0)
print(' '.join(map(str, way)))


import sys
(n, k, s) = map(int, sys.stdin.readline().split())
if (n - 1) * k >= s and k <= s:
	print('YES')
	dist = k
	kolvo = 0
	while dist < s:
		dist += n - 2
		kolvo += 1
	for i in range(kolvo - 1):
		if i % 2 == 0:
			print(n, end=' ')
		else:
			print(1, end=' ')
	if dist == s:
		if kolvo % 2 == 1:
			dom = n
		else:
			dom = 1
	else:
		dom = s - (dist - (n - 2))
		if kolvo % 2 == 1:
			dom = dom + 2
		else:
			dom = n - dom - 1
	if kolvo > 0:
		print(dom, end=' ')
	if dom != n and kolvo % 2 == 0:
		if dom <= 2:
			dom += 1
		else:
			dom -= 1
	for i in range(kolvo + 1, k + 1):
		if i % 2 == 0:
			print(dom - 1, end=' ')
		else:
			print(dom, end=' ')
else:
	print('NO')


import math as ma
from sys import exit
from decimal import Decimal as dec

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())
(n, k, s) = num()
if k > s or k * (n - 1) < s:
	print('NO')
else:
	l = []
	if s % k == 0:
		for i in range(k):
			if i % 2 == 0:
				l.append(s // k + 1)
			else:
				l.append(1)
	else:
		pp = s % k
		for i in range(pp):
			if i % 2 == 0:
				l.append(s // k + 2)
			else:
				l.append(1)
		if pp % 2 == 0:
			for i in range(pp, k):
				if i % 2 == 0:
					l.append(s // k + 1)
				else:
					l.append(1)
		else:
			for i in range(pp, k):
				if i % 2 == 1:
					l.append(2)
				else:
					l.append(s // k + 2)
	print('YES')
	print(*l)


(n, k, s) = input().strip().split(' ')
n = int(n)
k = int(k)
s = int(s)
moves_left = k
current_pos = 1
houses = []
if moves_left <= s:
	for _ in range(k):
		moves_left -= 1
		far_point = 1
		if n - current_pos > current_pos - 1:
			far_point = n
		if abs(far_point - current_pos) > s - moves_left:
			if far_point == n:
				current_pos = current_pos + s - moves_left
			else:
				current_pos = current_pos - s + moves_left
			s = moves_left
		else:
			s = s - abs(current_pos - far_point)
			current_pos = far_point
		houses.append(current_pos)
if s > 0:
	print('NO')
else:
	print('YES')
	for house in houses:
		print(house, end=' ')


(n, k, s) = map(int, input().split())
(i, ans) = (1, '')
if s > (n - 1) * k or k > s:
	print('NO')
else:
	print('YES')
	while k > 0:
		dist = min(n - 1, s - (k - 1))
		s -= dist
		if i - dist > 0:
			i -= dist
		else:
			i += dist
		ans += str(i) + ' '
		k -= 1
	print(ans)


(n, k, s) = [int(x) for x in input().split()]
d = s
p = k
fin = []
a = 1
b = n
i = 0
while p != 0:
	p -= 1
	if d - abs(a - b) > p:
		d -= abs(a - b)
		if i % 2 == 0:
			fin.append(b)
		else:
			fin.append(a)
	elif d - abs(a - b) == p:
		d -= abs(a - b)
		if i % 2 == 0:
			fin.append(b)
			a = b - 1
		else:
			fin.append(a)
			b = a + 1
	elif d - abs(a - b) < p:
		c = abs(p - d)
		d -= c
		if i % 2 == 0:
			fin.append(a + c)
			b = a + c
			a = b - 1
		else:
			fin.append(b - c)
			a = b - c
			b = a + 1
	i += 1
if d != 0 or s < k:
	print('NO')
else:
	print('YES')
	for i in fin:
		print(i, end=' ')


(n, k, s) = map(int, input().split())
if s > (n - 1) * k:
	print('NO')
	exit(0)
cur = 1
cn = s // k
ans = []
for i in range(k, 0, -1):
	m = cn
	if cn * i < s:
		m += 1
	if cur + m <= n:
		cur += m
	else:
		cur -= m
	s -= m
	ans += [cur]
for i in range(k - 1):
	if ans[i] == ans[i + 1]:
		print('NO')
		exit(0)
print('YES')
print(*ans)


import os
import sys
from math import *
from collections import *
from itertools import *
from heapq import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 998244353
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(1):
	(n, k, s) = value()
	ans = []
	for ones in range(k):
		need = s - ones
		if need // (k - ones) + (need % (k - ones) > 0) < n and need >= k - ones:
			last = 1
			each = need // (k - ones)
			extra = need % (k - ones)
			while need:
				here = extra > 0
				if each + here <= need:
					need -= each + here
					if last + each + here <= n:
						last += each + here
					else:
						last -= each + here
				else:
					each = need
					need = 0
					if last + each + here <= n:
						last += each + here
					else:
						last -= each + here
				ans.append(last)
				extra -= 1
			for j in range(ones):
				if last + 1 <= n:
					last += 1
				else:
					last -= 1
				ans.append(last)
			break
	if ans:
		print('YES')
		print(*ans)
	else:
		print('NO')


import sys
(n, k, s) = map(int, input().split())
if k * (n - 1) < s or s < k:
	print('NO')
	sys.exit(0)
print('YES')
pos = 1
while s > 0:
	dist = min(n - 1, s - k + 1)
	s -= dist
	k -= 1
	pos = pos + dist if pos + dist <= n else pos - dist
	print(pos, end=' ')


(n, k, s) = map(int, input().split())
ans = []
idx = 1
flag = True
for i in range(1, k + 1):
	t = min(n - 1, s - (k - i))
	if t <= 0:
		flag = False
		break
	if idx + t <= n:
		idx += t
		ans.append(idx)
		s -= t
	else:
		idx -= t
		ans.append(idx)
		s -= t
if s != 0 or flag == False:
	print('NO')
else:
	print('YES')
	print(' '.join(map(str, ans)))


(n, k, s) = map(int, input().split())
if s < k or k * (n - 1) < s:
	print('NO')
	exit()
print('YES')
cur_pos = 1
while s > k:
	delta = min(n - 1, s - (k - 1))
	s -= delta
	cur_pos += delta if cur_pos + delta <= n else -delta
	k -= 1
	print(cur_pos, end=' ')
while k > 0:
	cur_pos += 1 if cur_pos + 1 <= n else -1
	k -= 1
	print(cur_pos, end=' ')
print()


(n, k, s) = (int(x) for x in input().split())
ans = []
if k > s or k * (n - 1) < s:
	print('NO')
else:
	now = 1
	print('YES')
	while k > 0:
		per = min(s - k + 1, n - 1)
		if now <= per:
			now += per
		else:
			now -= per
		print(now, end=' ')
		s -= per
		k -= 1


(n, k, s) = [int(x) for x in input().split()]
house = 1
if k > s or (n - 1) * k < s:
	print('NO')
else:
	print('YES')
	avg_step = s // k
	rem = s % k
	for i in range(1, k + 1):
		if rem == 0 and i % 2 != 0:
			house += avg_step
			print(house, end=' ')
		elif rem == 0 and i % 2 == 0:
			house -= avg_step
			print(house, end=' ')
		elif rem != 0 and i % 2 != 0:
			house += avg_step + 1
			rem -= 1
			print(house, end=' ')
		elif rem != 0 and i % 2 == 0:
			house -= avg_step + 1
			rem -= 1
			print(house, end=' ')


import math
(n, k, s) = map(int, input().split())
if (n - 1) * k < s:
	print('NO')
elif 1 * k > s:
	print('NO')
else:
	print('YES')
	ans = []
	a = math.ceil(s / k)
	i = 0
	if a == 1:
		for j in range(k):
			if i % 2 == 0:
				ans.append(str(2))
			else:
				ans.append(str(1))
			i += 1
		print(' '.join(ans))
		exit()
	while s / (a - 1) != k:
		if i % 2 == 0:
			ans.append(str(1 + a))
		else:
			ans.append(str(1))
		s -= a
		k -= 1
		i += 1
	for j in range(s // (a - 1)):
		if ans == []:
			ans.append(str(a))
			i += 1
			continue
		if i % 2 == 0:
			ans.append(str(int(ans[-1]) + a - 1))
		else:
			ans.append(str(int(ans[-1]) - a + 1))
		i += 1
	print(' '.join(ans))


import sys
input = sys.stdin.readline
(n, k, s) = map(int, input().split())
if k * (n - 1) < s or s < k:
	print('NO')
	exit(0)
print('YES')
r = s % k
q = s // k
fi = q + 1
flag = 2
r1 = []
while k:
	k -= 1
	if r:
		if flag == 1:
			fi -= 1
		else:
			fi += 1
		r -= 1
	r1.append(fi)
	if fi - q >= 1 and fi - q <= n:
		flag = 1
		fi = fi - q
	else:
		flag = 2
		fi = fi + q
print(*r1)


def step(cur, x):
	if cur - x <= 0:
		return cur + x
	else:
		return cur - x
(n, k, s) = map(int, input().split())
mi = 0
b = []
cur = 1
if (n - 1) * k >= s and k <= s:
	print('YES')
	while k > 0:
		mi = min(n - 1, s - (k - 1))
		cur = step(cur, mi)
		s -= mi
		k -= 1
		b.append(cur)
	for i in b:
		print(i, end=' ')
else:
	print('NO')


(n, k, s) = [int(s) for s in input().split()]
if (n - 1) * k < s:
	print('NO')
elif k > s:
	print('NO')
else:
	steps = []
	curr = 1
	ss = s
	div = s // k
	stepleft = k
	while ss > 0:
		step = div
		if step * stepleft < ss:
			step += 1
		if curr + step <= n:
			steps.append(curr + step)
			curr = curr + step
		else:
			steps.append(curr - step)
			curr = curr - step
		ss -= step
		stepleft -= 1
	print('YES')
	print(*steps)


import math
from sys import stdin, stdout
input = stdin.readline

def main():
	(n, k, s) = map(int, input().split())
	if s < k or s > (n - 1) * k:
		print('NO')
	else:
		left = s
		res = []
		curr = 1
		while left > 0:
			if k == 1:
				if curr - left >= 1:
					res.append(curr - left)
					left = 0
				else:
					res.append(curr + left)
					left = 0
			else:
				up = math.ceil(left / k)
				down = math.floor(left / k)
				can_go_up = math.floor((left - up) / (k - 1)) > 0
				if can_go_up:
					step = up
					left -= up
				else:
					step = down
					left -= down
				k -= 1
				if curr - step >= 1:
					curr -= step
					res.append(curr)
				else:
					curr += step
					res.append(curr)
		print('YES')
		print(*res)
main()


import sys
input = lambda : sys.stdin.readline().strip('/r/n')

def step(cur, x):
	if cur - x > 0:
		return cur - x
	else:
		return cur + x
(n, k, s) = map(int, input().split())
cur = 1
if k > s or k * (n - 1) < s:
	print('NO')
else:
	print('YES')
	while k > 0:
		l = min(n - 1, s - (k - 1))
		cur = step(cur, l)
		print(cur, end=' ')
		s -= l
		k -= 1


(n, m, k) = map(int, input().split())
if k < m or k > m * (n - 1):
	print('NO')
else:
	print('YES')
	(i, j) = (1, n)
	while True:
		if k - (n - 1) < m:
			temp = j
			j = i
			i = temp
			break
		else:
			k -= n - 1
			m -= 1
			print(j, end=' ')
			temp = j
			j = i
			i = temp
	if j == n:
		print(j - (k - m + 1), end=' ')
		j -= k - m + 1
		k -= m - 1
		m -= 1
		i = j + 1
		while m > 0:
			print(i, end=' ')
			k -= 1
			m -= 1
			temp = j
			j = i
			i = temp
	else:
		print(j + (k - m + 1), end=' ')
		j += k - m + 1
		k -= m - 1
		m -= 1
		i = j - 1
		while m > 0:
			print(i, end=' ')
			k -= 1
			m -= 1
			temp = j
			j = i
			i = temp


(n, k, s) = map(int, input().split())
if k <= s <= (n - 1) * k:
	long = 0 if n == 2 else max((s - k) // (n - 2), 0)
	left = s - (n - 1) * long
	k -= long
	sm = long * (n - 1)
	ans = list()
	for i in range(long):
		if len(ans) == 0 or ans[-1] == 1:
			ans.append(n)
		else:
			ans.append(1)
	leftSide = True if len(ans) == 0 or ans[-1] == 1 else False
	while k > 1:
		k -= 1
		sm += 1
		if leftSide:
			ans.append(2 if len(ans) == 0 or ans[-1] == 1 else 1)
		else:
			ans.append(n - 1 if len(ans) == 0 or ans[-1] == n else n)
	if sm != s:
		if len(ans) != 0 and ans[-1] == n:
			leftSide = False
		if leftSide:
			ans.append((1 if len(ans) == 0 else ans[-1]) + (s - sm))
		else:
			ans.append((n if len(ans) == 0 else ans[-1]) - (s - sm))
	print('YES')
	print(*ans)
else:
	print('NO')


import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, k, s) = map(int, input().split())
if (n - 1) * k < s or k > s:
	print('NO')
else:
	ar = []
	d = n - 1
	c = s
	kc = k
	cp = 1
	while kc > 0:
		if c - d >= kc - 1:
			c -= d
			kc -= 1
			if cp + d <= n:
				cp += d
			else:
				cp -= d
			ar.append(cp)
		else:
			d = min(d - 1, c)
	print('YES')
	print(*ar, end=' ')


def main():
	(lastHomeNum, tripsNum, Dist) = map(int, input().split())
	visited = [1]
	for i in range(tripsNum):
		step = min(lastHomeNum - 1, Dist + 1 - (tripsNum - i))
		Dist -= abs(step)
		if i % 2 == 0:
			k = 1
		else:
			k = -1
		if step == 0:
			print('NO')
			return
		visited.append(visited[i] + k * step)
	if Dist == 0:
		print('YES')
		for i in range(1, len(visited)):
			print(visited[i], end=' ')
	else:
		print('NO')
main()


s = list(map(int, input().split()))
(n, k, s) = (s[0], s[1], s[2])
t = s // k
res = []
if k * t == s:
	if t <= n - 1:
		for i in range(k):
			if i % 2 == 0:
				res.append(1 + t)
			else:
				res.append(1)
		print('YES')
		print(*res)
	else:
		print('NO')
elif t == 0:
	print('NO')
elif t + 1 <= n - 1:
	for i in range(s - t * k):
		if i % 2 == 0:
			res.append(1 + t + 1)
		else:
			res.append(1)
	if res[-1] == 1:
		for i in range(k - s + t * k):
			if i % 2 == 0:
				res.append(1 + t)
			else:
				res.append(1)
	else:
		last = res[-1]
		for i in range(k - s + t * k):
			if i % 2 == 0:
				res.append(last - t)
			else:
				res.append(last)
	print('YES')
	print(*res)
else:
	print('NO')


nks = input().strip().split()
(n, k, s) = (int(nks[0]), int(nks[1]), int(nks[2]))
if (n - 1) * k < s or s < k:
	print('NO')
else:
	print('YES')
	t = n - 1
	h = 1
	while s > 0:
		if s - t >= k - 1:
			if t + h <= n:
				h = h + t
				print(h, end=' ')
			else:
				h = h - t
				print(h, end=' ')
			s -= t
			k -= 1
		else:
			t = s - (k - 1)


from sys import stdin, stdout

def main():
	(n, k, s) = map(int, stdin.readline().split())
	pos = 1
	if k * (n - 1) < s or k > s:
		stdout.write('NO')
	else:
		stdout.write('YES\n')
		up = True
		d = n - 1
		while k > 0:
			while k > 0 and k - 1 <= s - d:
				k -= 1
				s -= d
				pos += d if up else -d
				stdout.write('{} '.format(pos))
				up = not up
			d = s - k + 1
main()


(n, k, s) = map(int, input().split())
from math import ceil
if s > k * (n - 1) or k > s:
	print('NO')
else:
	ans = []
	nums = s // (n - 1)
	re = s % (n - 1)
	ini = 1
	for i in range(nums):
		if ini == 1:
			ans.append(n)
			ini = n
		else:
			ans.append(1)
			ini = 1
	if re:
		if ini == 1:
			ans.append(1 + re)
		else:
			ans.append(n - re)
	re_moves = k - len(ans)
	r_ans = [0 for i in range(k)]
	right_index = k - 1
	for i in range(len(ans) - 1, -1, -1):
		r_ans[right_index] = ans[i]
		right_index -= 1
		if i != 0:
			prev = ans[i - 1]
			minus = abs(ans[i] - ans[i - 1]) - 1
		else:
			prev = 1
			minus = ans[i] - 1
		for j in range(minus):
			if re_moves <= 0:
				break
			if prev > ans[i]:
				r_ans[right_index] = ans[i] + j + 1
			else:
				r_ans[right_index] = ans[i] - j - 1
			re_moves -= 1
			right_index -= 1
	print('YES')
	print(' '.join((str(i) for i in r_ans)))


import sys
from math import *

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())
(n, k, s) = mints()
if k * (n - 1) < s or s < k * 1:
	print('NO')
else:
	r = [n - 1] * k
	c = (n - 1) * k
	for i in range(k - 1, -1, -1):
		if c == s:
			break
		x = min(n - 2, c - s)
		r[i] -= x
		c -= x
	print('YES')
	c = 1
	x = 1
	for i in r:
		c += i * x
		print(c, end=' ')
		x *= -1


from math import floor
import sys
line = input().split()
n = int(line[0])
k = int(line[1])
s = int(line[2])
average = s / k
remainder = s % k
size_of_steps = []
houses = []
if average > n - 1 or average < 1:
	print('NO')
	sys.exit(0)
average = floor(average)
if remainder == 0:
	for i in range(k):
		size_of_steps.append(average)
else:
	for i in range(k):
		if remainder != 0:
			size_of_steps.append(average + 1)
			remainder -= 1
		else:
			size_of_steps.append(average)
current = 1
for i in range(k):
	if current + size_of_steps[i] <= n:
		current += size_of_steps[i]
	else:
		current -= size_of_steps[i]
	houses.append(current)
print('YES')
for house in houses:
	print(str(house) + ' ', end='')


(n, k, s) = map(int, input().split())
if s % (n - 1) == 0:
	z = 0
else:
	z = 1
low = s // (n - 1) + z
high = s
if low <= k <= high:
	print('YES')
	ans = []
	cur = 1
	for i in range(k):
		z = min(n - 1, s - k + 1)
		if cur + z <= n:
			ans.append(cur + z)
			cur = cur + z
		else:
			ans.append(cur - z)
			cur = cur - z
		s -= z
		k -= 1
	print(*ans)
else:
	print('NO')