Polycarpus has got n candies and m friends (n ≥ m). He wants to make a New Year present with candies to each friend. Polycarpus is planning to present all candies and he wants to do this in the fairest (that is, most equal) manner. He wants to choose such a_{i}, where a_{i} is the number of candies in the i-th friend's present, that the maximum a_{i} differs from the least a_{i} as little as possible.

For example, if n is divisible by m, then he is going to present the same number of candies to all his friends, that is, the maximum a_{i} won't differ from the minimum one.


-----Input-----

The single line of the input contains a pair of space-separated positive integers n, m (1 ≤ n, m ≤ 100;n ≥ m) — the number of candies and the number of Polycarpus's friends.


-----Output-----

Print the required sequence a_1, a_2, ..., a_{m}, where a_{i} is the number of candies in the i-th friend's present. All numbers a_{i} must be positive integers, total up to n, the maximum one should differ from the minimum one by the smallest possible value.


-----Examples-----
Input
12 3

Output
4 4 4 
Input
15 4

Output
3 4 4 4 
Input
18 7

Output
2 2 2 3 3 3 3 


-----Note-----

Print a_{i} in any order, separate the numbers by spaces.

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
(n, m) = map(int, input().split())
k = 0
while n > 0:
	k = n // m
	print(k, end=' ')
	n -= k
	m -= 1


tmp = input().split(' ')
n = int(tmp[0])
m = int(tmp[1])
d = n // m
r = n % m
print(*[d] * (m - r), *[d + 1] * r)


(n, m) = map(int, input().split())
for i in range(0, m):
	print(n // m + (i < n % m), end=' ')


(n, m) = map(int, input().split())
(q, r) = divmod(n, m)
print(' '.join([str(q + 1)] * r + [str(q)] * (m - r)))


(n, m) = map(int, input().split())
print(*[n // m] * (m - n % m) + [n // m + 1] * (n % m))


(n, m) = map(int, input().split())
minc = int(n / m)
pri = n % m
a = []
for i in range(0, m - pri):
	a.append(minc)
for i in range(0, pri):
	a.append(minc + 1)
sta = ''
for i in range(0, m):
	if i == m - 1:
		sta = sta + str(a[i])
	else:
		sta = sta + str(a[i]) + ' '
print(sta)


lst = []
cp = list(map(int, input().strip().split()))
c = cp[0]
p = cp[1]
quotient = c // p
remainder = c % p
for i in range(p):
	lst.append(quotient)
for i in range(remainder):
	lst[i] += 1
for i in lst:
	print(str(i), end=' ')


(x, y) = input().split()
(x, y) = (int(x), int(y))
res = [x // y] * y
left_candies = x % y
for i in range(left_candies):
	ind = y - left_candies + i
	res[ind] = res[ind] + 1
for i in res:
	print(i, end=' ')


(n, m) = map(int, input().split())
div = n // m
mod = n % m
lst = []
k = 1
for i in range(m):
	lst.append(div)
for item in lst:
	if mod != 0 and mod > 0:
		lst[lst.index(item)] = lst[lst.index(item)] + 1
	mod = mod - 1
lst.sort()
for item in lst:
	if k == len(lst) - 1:
		print(item)
	print(item, end=' ')


def main():
	(n, m) = [int(v) for v in input().split()]
	v = n // m
	v2 = n % m
	print(' '.join([str(r) for r in [v] * (m - v2) + [v + 1] * v2]))
main()


(m, n) = input().split()
m = int(m)
n = int(n)
while n != 0:
	if m % n:
		print(int(m / n))
		m = m - int(m / n)
		n -= 1
	else:
		for i in range(n):
			print(int(m / n))
		exit()


(n, m) = list(map(int, input().strip().split()))
t = n // m
for x in range(m + 1):
	if x * t + (m - x) * (t + 1) == n:
		ans = [t] * x + [t + 1] * (m - x)
		break
print(' '.join(map(str, ans)))


(a, b) = map(int, input().split())
arr = []
for char in range(int(b)):
	arr.append(a // b + 1)
if a % b == 0:
	string = str(a // b)
	print((string + ' ') * b)
else:
	count = 0
	count2 = 0
	while sum(arr) > a:
		arr[count] = arr[count] - 1
		count += 1
	while sum(arr) < a:
		arr[count2] = arr[count2] + 1
		count2 += 1
	joined_arr = ' '.join(map(str, arr))
	print(joined_arr)


(n, m) = map(int, input().split())
ans = n // m
my_list = []
for i in range(0, m):
	my_list.append(ans)
for i in range(0, n % m):
	my_list[i] += 1
sorted_list = sorted(my_list)
for i in range(0, m):
	print(sorted_list[i], end=' ')


def main():
	(n, m) = [int(i) for i in input().split()]
	a = [n // m] * m
	l = n - n // m * m
	for i in range(l):
		a[i] += 1
	print(' '.join(map(str, a)))
main()


(a, b) = map(int, input().split())
l = [a // b + 1] * (a % b) + [a // b] * (b - a % b)
print(*l)


import math
(n, m) = map(int, input().split())
div = n / m
ans = [math.floor(div)] * (m - n % m)
ans += [math.ceil(div)] * (n % m)
print(*ans, sep=' ')


(n, m) = map(int, input().split())
a = [0] * m
for x in range(n):
	a[x % m] += 1
print(*a)


(n, m) = map(int, input().split())
if n % m == 0:
	arr = [n // m] * m
else:
	arr = [n // m + 1] * (n % m)
	sm = sum(arr)
	diff = n - sm
	last = m - len(arr)
	arr = arr + [diff // last] * last
for i in sorted(arr):
	print(i, end=' ')


[n, m] = map(int, input().split())
remainder = n % m
normal = (n - remainder) // m
for i in range(remainder):
	print(normal + 1, end=' ')
for i in range(m - remainder):
	print(normal, end=' ')


from math import ceil, floor
(n, m) = map(int, input().split())
L = []
if not n % m:
	for _ in range(m):
		L.append(n // m)
else:
	MIN = floor(n / m)
	MAX = ceil(n / m)
	for _ in range(n % m):
		L.append(MAX)
	for _ in range(m - n % m):
		L.append(MIN)
print(' '.join(map(str, L)))


(n, k) = map(int, input().split())
if n % k == 0:
	p = n // k
	while k > 0:
		print(p, end=' ')
		k = k - 1
else:
	p = n // k + 1
	r = p * k - n
	k = k - r
	while r > 0:
		print(p - 1, end=' ')
		r = r - 1
	while k > 0:
		print(p, end=' ')
		k = k - 1


(n, m) = [int(i) for i in input().split()]
if n % m == 0:
	print((str(n // m) + ' ') * m)
else:
	k = n // m
	r = n % m
	for i in range(0, m):
		if r != 0:
			print(k + 1, end=' ')
			r = r - 1
		else:
			print(k, end=' ')


[candy, people] = map(int, input().split())
div = int(candy // people)
extra = int(candy % people)
listt = []
for x in range(0, people):
	listt.append(div)
for x in range(0, extra):
	listt[x] = div + 1
addon = str(listt[0])
for x in range(1, people):
	addon = addon + ' ' + str(listt[x])
print(addon)


(n, m) = input().split()
ans: list = []
y: int = 0
while int(n) > 0:
	x = int(n) // int(m)
	ans.append(x)
	n = int(n) - int(x)
	m = int(m) - 1
print(*ans)


import math
(n, m) = list(map(int, input().split()))
if n % m == 0:
	for i in range(m):
		print(n // m, end=' ')
else:
	first = n % m
	for k in range(first):
		print(n // m + 1, end=' ')
	for k in range(first, m):
		print(n // m, end=' ')


(n, k) = map(int, input().split())
v = n // k
r = n % k
l = [v] * k
if r == 0:
	print(*l, sep=' ')
else:
	a = l[-r:]
	a = [v + 1] * r
	l[-r:] = a
	print(*l, sep=' ')


(n, m) = map(int, input().split())
ans = []
if int(n % m) == 0:
	for i in range(m):
		ans.append(int(n / m))
else:
	ans = [0] * m
	s = sum(ans, 0)
	while s != n:
		for i in range(m):
			ans[i] += 1
			s = sum(ans, 0)
			if s == n:
				break
ans = sorted(ans)
for i in ans:
	print(i, end=' ')


(n, m) = map(int, input().split())
y = n % m
x = n // m
if y == 0:
	print(*[n // m] * m)
else:
	a = [x] * m
	z = sum(a)
	i = 0
	while z < n:
		a[i] += 1
		i += 1
		z = sum(a)
	a.sort()
	print(*a)


(n, m) = list(map(int, input().split()))
l = [n // m] * m
for i in range(n % m):
	l[~i] += 1
print(*l)


(n, m) = list(map(int, input().split()))
a = int(n / m)
d = n - m * a
for i in range(m - d):
	print(a, end=' ')
for i in range(m - d, m):
	print(a + 1, end=' ')


(n, m) = map(int, input().split())
l = []
if n % m == 0:
	for i in range(m):
		l.append(n // m)
	print(*l)
else:
	for i in range(n % m):
		l.append(n // m + 1)
	for i in range(m - n % m):
		l.append(n // m)
	print(*l)


(x, y) = map(int, input().split())
if x % y == 0:
	d = x // y
	s = y * (str(d) + ' ')
else:
	a = x % y
	b = x // y
	c = y - a
	s = c * (str(b) + ' ') + a * (str(b + 1) + ' ')
print(s[:-1])


[n, m] = map(int, input().split())
small = n // m
num_big = n % m
list = []
for i in range(0, m - num_big):
	list.append(small)
for i in range(0, num_big):
	list.append(small + 1)
for i in range(m):
	print(str(list[i]), end=' ')


(n, m) = map(int, input().split())
for i in range(m):
	a = n // m
	print(a)
	n = n + 1


def solve():
	b = [str(n // m + (1 if i < n % m else 0)) for i in range(m)]
	return ' '.join(b)

def main():
	global n, m
	(n, m) = map(int, input().split())
	print(solve())
main()


(n, m) = input().split()
n = int(n)
m = int(m)
x = n // m
y = n % m
for i in range(0, m - y):
	print(x)
for i in range(0, y):
	print(x + 1)


(m, n) = map(int, input().split())
l = [m // n + 1] * n
d = sum(l) - m
i = 0
while d:
	l[i] -= 1
	d -= 1
	i += 1
print(*l)


[n, m] = map(int, input().split())
if n % m == 0:
	for s in range(m):
		print(n // m, end=' ')
elif n % m != 0:
	k = n
	for e in range(n):
		n -= 1
		if n % m == 0:
			break
		else:
			continue
	X = k - n
	for x in range(m):
		if X > 0:
			x = n // m + 1
			X -= 1
		else:
			x = n // m
		print(x, end=' ')


(n, m) = map(int, input().split())
if n % m == 0:
	for i in range(m):
		print(n // m, end=' ')
	print()
else:
	x = n % m
	y = n // m
	for i in range(x):
		print(y + 1, end=' ')
	for i in range(m - x):
		print(y, end=' ')
	print()


(n, m) = map(int, input().split())
a = []
if n % m == 0:
	for i in range(m):
		print(n // m, end=' ')
else:
	for i in range(m):
		a.append(n // m)
	k = 0
	while sum(a) != n:
		a[k] += 1
		k += 1
	print(*a)


(n, m) = map(int, input().split())
c = n // m
d = n % m
l = [c for i in range(m)]
for i in range(d):
	l[i] = l[i] + 1
l.sort()
print(' '.join(map(str, l)))


import math
[num_candies, num_friends] = map(int, input().split())
candy_allocation = []
smaller_candies = math.floor(num_candies / num_friends)
num_friends_smaller = num_friends - num_candies % num_friends
larger_candies = math.ceil(num_candies / num_friends)
num_friends_larger = num_candies % num_friends
equal_candies = num_candies // num_friends
for i in range(num_friends_smaller):
	candy_allocation.append(smaller_candies)
for i in range(num_friends_larger):
	candy_allocation.append(larger_candies)
for i in range(num_friends):
	print(candy_allocation[i], end=' ')


I = lambda : map(int, input().split())
(n, m) = I()
r = n % m
t = n // m
for i in range(r):
	print(t + 1, end=' ')
for i in range(r, m):
	print(t, end=' ')


w = input('')
w = w.split(' ')
if int(w[0]) % int(w[1]) != 0:
	x = int(w[0]) // int(w[1]) + 1
	y = x * int(w[1]) - int(w[0])
	listF = [x - 1] * y + [x] * (int(w[1]) - y)
else:
	listF = [int(w[0]) // int(w[1])] * int(w[1])
print(*listF, sep=' ')


(n, m) = input().split()
n = int(n)
m = int(m)
L = []
least = n // m
remainder = n % m
for i in range(m):
	L.append(least)
for i in range(m):
	if i == m - 1:
		x = ''
	else:
		x = ' '
	if remainder > 0:
		print(least + 1, end=x)
		remainder -= 1
	else:
		print(least, end=x)


from math import ceil
X = list(map(int, input().split()))
Difference = X[1] * ceil(X[0] / X[1]) - X[0]
print((X[1] - Difference) * (str(ceil(X[0] / X[1])) + ' ') + Difference * (str(X[0] // X[1]) + ' '))


(n, m) = map(int, input().split())
a = []
for i in range(0, m):
	a.append(n // m)
n = n % m
for i in range(0, n):
	a[i] += 1
for i in a:
	print(i, end=' ')


T_ON = 0
DEBUG_ON = 1
MOD = 998244353

def solve():
	(n, m) = read_ints()
	(q, r) = divmod(n, m)
	A = [q] * m
	for i in range(r):
		A[-i - 1] += 1
	print_nums(A)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
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')

def read_int():
	return int(input())

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

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

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

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

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

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


(n, m) = list(map(int, input().split()))
p = n // m
s = n % m
t = []
for k in range(m):
	if s > 0:
		t.append(p + 1)
		s -= 1
	else:
		t.append(p)
t.sort()
print(*t)


(n, m) = str(input()).split()
l = ''
if int(n) % int(m) == 0:
	for i in range(int(m)):
		if i == 0:
			l = str(int(n) // int(m))
		else:
			l = l + ' ' + str(int(n) // int(m))
	print(l)
else:
	a = int(n) // int(m)
	b = int(n)
	for i in range(int(m)):
		if i == 0:
			l = str(a)
			b = b - a
		elif b % (a + 1) == 0 and b // (a + 1) == int(m) - i:
			l = l + ' ' + str(a + 1)
			b = b - a - 1
		else:
			l = l + ' ' + str(int(n) // int(m))
			b = b - a
	print(l)


(n, m) = map(int, input().split())
K = n % m
ans = ''
ls = []
if K == 0:
	L = n // m
	for i in range(m):
		ls.append(L)
	print(*ls)
else:
	L = n // m
	s = m - n % m
	for i in range(m):
		if i < s:
			ls.append(L)
		else:
			ls.append(L + 1)
	print(*ls)


(candies, n) = input().split(' ')
candies = int(candies)
n = int(n)
answer = []
while n > 0:
	temp = int(candies / n)
	answer.append(temp)
	n -= 1
	candies = candies - temp
for i in answer:
	print(i, end=' ')


(a, b) = input().split()
(a, b) = (int(a), int(b))
c = a // b
rem = a % b
d = [c] * (b - rem)
d = d + [c + 1] * rem
for i in d:
	print(i, end=' ')


(n, m) = map(int, input().split())
k = n // m
rem = n % m
for i in range(m - rem):
	print(k, '', end='')
for i in range(rem):
	print(k + 1, '', end='')


(n, m) = input().split()
n = int(n)
m = int(m)
q = n // m
r = n % m
lst = []
for i in range(m):
	if i < m - r:
		lst.append(q)
	else:
		lst.append(q + 1)
print(*lst)


(n, m) = map(int, input().split())
l = [0] * m
if n % m == 0:
	for i in range(m):
		l[i] = n // m
else:
	for j in range(m):
		l[j] = n // m
	c = n % m
	for k in range(c):
		l[k] += 1
print(*l)


(n, m) = input().split()
n = int(n)
m = int(m)
arr = [n // m] * m
for i in range(n % m):
	arr[-i - 1] = arr[-i - 1] + 1
ans = ''
for i in arr:
	ans += str(i) + ' '
print(ans)


(n, m) = map(int, input().split())
arr = [0 for i in range(m)]
a = 0
for i in range(n):
	arr[a] += 1
	a += 1
	if a == m:
		a = 0
for i in range(m):
	print(arr[i], end=' ')


fast = lambda : stdin.readline().strip()
zzz = lambda : [int(i) for i in fast().split()]
(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from re import *
from sys import *
from math import *
from heapq import *
from queue import *
from bisect import *
from string import *
from itertools import *
from collections import *
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from collections import Counter as cc
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def output(answer):
	stdout.write(str(answer))
(n, m) = zzz()
if n % m == 0:
	print((str(n // m) + ' ') * m)
else:
	t = n % m
	arr = [n // m] * m
	i = 0
	while t:
		arr[i] += 1
		t -= 1
		i += 1
		if i % m == 0:
			i = 0
	print(*arr)


(n, m) = map(int, input().split())
k = n // m
l = []
for i in range(m):
	l.append(k)
	n -= k
i = 1
while n:
	l[m - i] += 1
	i += 1
	n -= 1
for i in l:
	print(i, end=' ')


(n, m) = list(map(int, input().split()))
print(((str(n // m) + ' ') * (m - n % m) + (str(n // m + 1) + ' ') * (n % m)).strip())


import sys

def solve():
	(n, m) = map(int, input().split())
	res = [0] * m
	for i in range(n):
		res[i % m] += 1
	return ' '.join(map(str, res))
if sys.hexversion == 50594544:
	sys.stdin = open('test.txt')
print(solve())


(n, m) = map(int, input().strip().split())
ans = int(n / m)
a = []
for i in range(m):
	a.append(ans)
s = sum(a)
val = n - s
if val != 0:
	i = 0
	while True:
		a[i] = a[i] + 1
		i += 1
		val -= 1
		if val == 0:
			break
print(*a)


(n, m) = [int(s) for s in input().split(' ')]
d = n // m
mod = n % m
ans = []
for i in range(m):
	if mod > 0:
		ans.append(d + 1)
		mod -= 1
	else:
		ans.append(d)
print(' '.join(map(str, ans)))


(n, m) = map(int, input().split())
a = n // m
b = n % m
l = []
for i in range(m):
	if b > 0:
		l.append(a + 1)
		b -= 1
	else:
		l.append(a)
l.sort()
for i in l:
	print(i, end=' ')


(a, b) = map(int, input().split())
c = [0] * b
for i in range(b):
	c[i] = a // b
for i in range(a % b):
	c[i] += 1
print(*c)


(n, m) = map(int, input().split())
a = [0] * m
i = []
nn = n
c = 0
while nn > 0:
	nn -= 1
	i.append(c)
	c += 1
	if c == m:
		c = 0
for x in i:
	a[x] += 1
print(*a)


(n, m) = map(int, input().split())
x = n // m
y = n % m
print(' '.join([str(x + 1)] * y + [str(x)] * (m - y)))


(n, m) = [int(x) for x in input().split()]
mn = n // m
a = [mn for i in range(m)]
rem = n % m
for i in range(m - rem, m):
	a[i] += 1
for i in range(m):
	print(a[i], end=' ')
print()


nm = input().split()
n = int(nm[0])
m = int(nm[1])
i = n // m
j = n % m
for x in range(m - j):
	print(i, end=' ')
for x in range(j):
	print(i + 1, end=' ')


(n, m) = [int(s) for s in input().split(' ')]
ans = [n // m] * (m - n % m) + [n // m + 1] * (n % m)
print(*ans)


(n, m) = map(int, input().split())
(k, d) = (n // m, n % m)
print((str(k) + ' ') * (m - d) + (str(k + 1) + ' ') * d)


(a, b) = list(map(int, input().split()))
k = a // b
w = []
for i in range(b):
	w.append(a // b)
	a -= a // b
	b -= 1
print(*w)


def main():
	[n, m] = [int(_) for _ in input().split()]
	a = n // m
	b = n % m
	s = [str(a)] * (m - b) + [str(a + 1)] * b
	print(' '.join(s))
main()


(n, m) = map(int, input().split())
a = n // m
b = n % m
if b == 0:
	print((str(a) + ' ') * m)
else:
	print((str(a + 1) + ' ') * b, (str(a) + ' ') * (m - b), sep='')


(n, k) = map(int, input().split())
res = [n // k for i in range(k)]
for i in range(n % k):
	res[i] += 1
for x in sorted(res):
	print(x, end=' ')


(n, m) = map(int, input().split())
list1 = []
if n % m == 0:
	list1 = [n // m] * m
	for i in list1:
		print(i, end=' ')
else:
	for i in range(m):
		least = n // (m - i)
		list1.append(least)
		n -= least
	for i in list1:
		print(i, end=' ')


(c, f) = map(int, input().split())
distribution_list = []
for i in range(f):
	distribution_list.append(c // f)
for i in range(c % f):
	distribution_list[i] += 1
ans = str()
for i in range(len(distribution_list) - 1):
	ans = ans + str(distribution_list[i]) + ' '
ans += str(distribution_list[-1])
print(ans)


(n, m) = input().split()
if int(n) % int(m) == 0:
	can = str(int(n) // int(m)) + ' '
	print(can * int(m))
else:
	can = [int(n) // int(m)] * int(m)
	remain = int(n) % int(m)
	for x in range(remain):
		can[x] += 1
	can = [str(y) for y in can]
	print(' '.join(can))


(n, m) = map(int, input().split())
l = []
if n % m == 0:
	for k in range(m):
		l.append(n // m)
	print(*l)
else:
	for i in range(n % m):
		l.append(n // m + 1)
	suml = sum(l)
	a = n - suml
	for j in range(a // (n // m)):
		l.append(n // m)
	l.sort()
	print(*l)


(n, m) = map(int, input().split())
q = n // m
r = n % m
for i in range(m - r):
	print(q, end=' ')
for i in range(r):
	print(q + 1, end=' ')


def main():
	(n, m) = map(int, input().split())
	a = [n // m] * m
	if sum(a) < n:
		for i in range(n - sum(a)):
			a[i] += 1
	print(*a)
main()


a = []
(n, m) = map(int, input().split())
q = n // m
for i in range(m):
	if i < n % m:
		a.append(q + 1)
	else:
		a.append(q)
for i in a:
	print(i, end=' ')


(n, m) = map(int, input().split())

def get_candies(n, m):
	mydiv = n // m
	mymod = n % m
	mylist = [mydiv for _ in range(m)]
	if mymod == 0:
		out = ' '.join((str(i) for i in mylist))
	else:
		for i in mylist:
			mylist[mylist.index(i)] += 1
			mymod -= 1
			if mymod == 0:
				out = ' '.join((str(i) for i in mylist))
				break
	return out
res = get_candies(n, m)
print(res)


param = list(map(int, input().split()))
answer = ''
for i in range(param[1]):
	if i <= param[1] - param[0] % param[1] - 1:
		answer += str(param[0] // param[1]) + ' '
	else:
		answer += str(param[0] // param[1] + 1) + ' '
print(answer)


def list2str(l):
	s = ''
	for d in l:
		s = s + str(d) + ' '
	s = s.strip()
	return s

def __starting_point():
	_input = input()
	data = list(map(int, _input.split()))
	n = data[0]
	m = data[1]
	avg = n // m
	plus = n - m * avg
	ans = list([avg] * (m - plus) + [avg + 1] * plus)
	print(list2str(ans))
__starting_point()


(n, m) = map(int, input().split())
d = n // m
resto = n % m
f = [d for i in range(m)]
for i in range(resto):
	f[i] += 1
f = sorted(f)
print(*f)


(candies, friends) = list(map(int, input().split()))
(q, r) = divmod(candies, friends)
answer = [q for _ in range(friends)]
i = friends - 1
while r > 0:
	answer[i] += 1
	i -= 1
	r -= 1
print(' '.join((str(x) for x in answer)))


[n, m] = map(int, input().split())
q = n // m
r = n % m
list_1 = []
for i in range(r):
	list_1.append(q + 1)
for i in range(m - r):
	list_1.append(q)
print(*list_1)


l = input()
l = l.split()
n = int(l[0])
k = int(l[1])
s = []
a = 0
while k != 0:
	a = n // k
	s.append(str(a))
	k -= 1
	n = n - a
ans = ''
for i in range(len(s)):
	ans += s[i] + ' '
print(ans)


(n, m) = map(int, input().split())
a = n // m
b = n % m
while b > 0 and m > 0:
	print(a + 1, end=' ')
	b -= 1
	m -= 1
while m > 0:
	print(a, end=' ')
	m -= 1


(n, m) = map(int, input().split())
ans = [n // m for i in range(m)]
for i in range(n % m):
	ans[i] += 1
print(' '.join(map(str, ans)))


r = lambda : int(input())
ra = lambda : [*map(int, input().split())]
(n, m) = ra()
a = [n // m for i in range(m)]
for i in range(n % m):
	a[i] += 1
print(*a)


(a, b) = input().split()
a = int(a)
b = int(b)
for i in range(b):
	if i < a % b:
		print(a // b + 1, end=' ')
	else:
		print(a // b, end=' ')


(n, m) = map(int, input().split())
equal = n // m
rest = n % m
eqnmr = m - rest
print((str(equal) + ' ') * eqnmr + (str(equal + 1) + ' ') * rest)


(c, f) = [int(x) for x in input().split()]
if c % f == 0:
	for i in range(f):
		print(c // f, end=' ')
else:
	x = [None] * f
	for i in range(f):
		x[i] = c // f
	for i in range(c % f):
		x[i] = x[i] + 1
	x.sort()
	for item in x:
		print(item, end=' ')


import sys
(n, m) = [int(x) for x in sys.stdin.readline().split()]
if n % m == 0:
	print(' '.join([str(int(n / m))] * m))
else:
	v = [str(int(n / m))] * (m - n % m)
	v.extend([str(int(n / m) + 1)] * (n % m))
	print(' '.join(v))


(n, m) = [int(x) for x in input().split()]
a = []
if n % m == 0:
	for i in range(m):
		a.append(int(n / m))
else:
	for i in range(m):
		a.append(int(n // m))
	for i in range(n % m):
		a[-(i + 1)] += 1
for i in range(m):
	print(a[i], end=' ')


(amount_candy, amount_friends) = map(int, input().split())
my_string = ''
list_candies = [0] * amount_friends
avarage_candy = amount_candy // amount_friends
vestiges_candy = amount_candy % amount_friends
for i in range(amount_friends):
	list_candies[i] += avarage_candy
while vestiges_candy > 0:
	list_candies[amount_friends - 1] += 1
	vestiges_candy -= 1
	amount_friends -= 1
for i in range(len(list_candies)):
	my_string += str(list_candies[i]) + ' '
print(my_string)


(n, m) = map(int, input().split())
r_min = n // m
r_max = r_min + int(n % m != 0)
n_min = m - n % m
n_max = m - n_min
for i in range(n_min):
	print(r_min, end=' ')
for i in range(n_max):
	print(r_max, end=' ')


(n, m) = map(int, input().split())
a = n // m
b = n % m
print((str(a) + ' ') * (m - b) + (str(a + 1) + ' ') * b)


(n, m) = [int(i) for i in input().split()]
print(*[n // m + 1 if i < n % m else n // m for i in range(m)])


(n, m) = map(int, input().split())
s = []
k = n // m
l = n - k * m
i = ''
for x in range(m):
	s.append(k)
for x in range(1, l + 1):
	s[-x] = k + 1
for x in s:
	i += str(x) + ' '
print(i)


(a, b) = map(int, input().split())
c = a // b
d = a % b
e = c + 1
l = []
for i in range(0, b - d):
	l.append(c)
for j in range(0, d):
	l.append(e)
l = [str(u) for u in l]
print(' '.join(l))


(n, m) = map(int, input().split())
min_for_all = n // m
kol_of_max = n - m * min_for_all
for i in range(m - kol_of_max):
	print(min_for_all, end=' ')
for i in range(kol_of_max):
	print(min_for_all + 1, end=' ')


(n, m) = map(int, input().split())
for i in range(m):
	d = 0
	if i < n % m:
		d = 1
	print(n // m + d, end=' ')


def main():
	from sys import stdin, stdout
	(n, m) = [int(i) for i in stdin.readline().split()]
	ans = []
	for i in range(m):
		x = n // m
		if i < n % m:
			x += 1
		ans.append(str(x))
	stdout.write(' '.join(ans))
main()


from math import ceil
(a, b) = map(int, input().split())
print((ceil(a / (a / b)) - a % b) * (str(a // b) + ' '), end='')
print(a % b * (str(a // b + 1) + ' '))


x = list(map(int, input().split(' ')))
if x[0] % x[1] == 0:
	print((str(x[0] // x[1]) + ' ') * x[1])
	exit()
print((str(x[0] // x[1] + 1) + ' ') * (x[0] % x[1]), (str(x[0] // x[1]) + ' ') * (x[1] - x[0] % x[1]), sep='')


(n, m) = map(int, input().split())
lst = [n // m] * m
for i in range(n % m):
	lst[i] += 1
for i in lst:
	print(i, end=' ')


def main():
	(n, m) = list(map(int, input().split()))
	(n, r) = divmod(n, m)
	print(' '.join([str(n)] * (m - r) + [str(n + 1)] * r))

def __starting_point():
	main()
__starting_point()


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
(n, m) = get_int_list()
lst = [n // m] * m
t = n % m
i = -1
while t > 0:
	lst[i] += 1
	t -= 1
	i -= 1
print(*lst)


(n, m) = map(int, input().split())
import math
divi = n / m
ans = [math.floor(divi)] * (m - n % m)
ans += [math.ceil(divi)] * (n % m)
for i in ans:
	print(i, end=' ')


import sys
ii = lambda : sys.stdin.readline().strip()
idata = lambda : [int(x) for x in ii().split()]

def solve():
	(n, m) = idata()
	d = n % m
	ans = n // m
	for i in range(m):
		if d:
			print(ans + 1, end=' ')
		else:
			print(ans, end=' ')
		d = max(d - 1, 0)
	return
for t in range(1):
	solve()


(n, m) = [int(x) for x in input().split()]
lista = []
if n % m == 0:
	for e in range(m):
		lista.append(str(n // m))
else:
	biu = n // m + 1
	ir = biu * m
	aux = ir - n
	for e in range(m):
		if e + 1 <= aux:
			lista.append(str(biu - 1))
		else:
			lista.append(str(biu))
print(' '.join(lista))


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
(nb_candies, nb_friends) = read_ints()
(div, mod) = divmod(nb_candies, nb_friends)
distribute = [div] * nb_friends
for i in range(1, mod + 1):
	distribute[-i] += 1
print(*distribute)


(C, F) = map(int, input().split())
while F > 0:
	c = C // F
	print(c, end=' ')
	F -= 1
	C -= c


(n, m) = map(int, input().split())
if n % m == 0:
	n //= m
	s = str(n) + ' '
	print(s * m)
else:
	t = n % m
	n //= m
	s = ''
	for i in range(t):
		s += str(n + 1) + ' '
	for i in range(m - t):
		s += str(n) + ' '
	print(s)


l1 = [int(x) for x in input().split()]
n = l1[0]
d = l1[1]
st = n % d
unit = int(n / d)
c_out = ''
i = 0
while i < st:
	c_out += str(unit + 1)
	c_out += ' '
	i += 1
while i < d:
	c_out += str(unit)
	c_out += ' '
	i += 1
print(c_out)


list = input().split(' ')
for i in range(2):
	list[i] = int(list[i])
a = list[0] // list[1]
b = list[0] % list[1]
list2 = []
for i in range(list[1]):
	if list[1] - b <= i:
		list2.append(a + 1)
	else:
		list2.append(a)
for i in range(len(list2)):
	print('%d' % list2[i], end=' ')


(n, m) = map(int, input().split())
res = []
while m:
	res.append(n // m)
	n -= n // m
	m -= 1
print(*res)


(candy, frends) = map(int, input().split())
garant = candy // frends
octatok = candy % frends
plus = garant + 1
for i in range(frends - octatok):
	print(garant, end=' ')
for i in range(octatok):
	print(plus, end=' ')


(n, k) = map(int, input().split())
import math
a = []
while n:
	r = math.ceil(n / k)
	n -= r
	k -= 1
	a.append(r)
a.sort()
print(' '.join((str(i) for i in a)))


(n, m) = map(int, input().split())
if n == m:
	s = '1 ' * m
	print(s)
else:
	x = n // m
	y = n % m
	s = [x] * m
	for i in range(y):
		s[i] = s[i] + 1
	s = str(s)
	u = s.replace('[', '')
	v = u.replace(']', '')
	w = v.replace(',', '')
	print(w)


(n, m) = map(int, input().split())
mid = n // m
l = []
for i in range(0, m):
	l.append(mid)
for i in range(0, n % m):
	l[i] += 1
ll = sorted(l)
for i in range(0, m):
	print(l[i], end=' ')


from sys import stdin, stdout

def main():
	(n, m) = map(int, stdin.readline().split(' '))
	(q, r) = (n // m, n % m)
	s = [q for i in range(m - r)]
	s.extend([q + 1 for i in range(m - r, m)])
	print(*s, sep=' ')
main()


s = input()
s2 = s.split(' ')
n = int(s2[0])
m = int(s2[1])
lst = []
f = n // m
for i in range(m):
	lst.append(f)
k = 0
for i in lst:
	k += i
while k < n:
	for j in range(len(lst)):
		lst[j] += 1
		k += 1
		if not k < n:
			break
for item in lst[::-1]:
	print(item, end=' ')


(n, m) = map(int, input().split())
if n >= m:
	m_list = [0] * m
	adding = n // m
	sub_adding = n % m
	for i in range(adding):
		for j in range(len(m_list)):
			m_list[j] += 1
	for k in range(sub_adding):
		m_list[k] += 1
	for l in m_list:
		print(l, sep=' ', end=' ')


(n, m) = map(int, input().split())
if n % m == 0:
	x = str(n // m) + ' '
	print(m * str(x))
else:
	extra = n % m
	x = str(n // m) + ' '
	y = str(n // m + 1) + ' '
	print(extra * str(y) + (m - extra) * str(x))


(n, m) = list(map(int, input().split()))
if n % m == 0:
	q = int(n / m)
	res = [q for i in range(m)]
	print(' '.join(list(map(str, res))))
else:
	q = int(n / m)
	res = [q for i in range(m)]
	mval = n % m
	for i in range(mval):
		res[i] += 1
	print(' '.join(list(map(str, reversed(res)))))


(n, m) = map(int, input().split())
de = n // m
a = [de for x in range(m)]
re = n % m
for i in range(m - re, m):
	a[i] += 1
for i in range(m):
	print(a[i], end=' ')


I = [int(i) for i in input().split()]
(conf, friend) = (I[0], I[1])
answer = []
ans = ''
mod = conf % friend
for i in range(friend):
	answer.append(int((conf - mod) / friend))
for i in range(mod):
	answer[i] += 1
for i in range(friend):
	ans += str(answer[i]) + ' '
print(ans[:-1])


(n, m) = map(int, input().split(' '))
for x in range(m):
	if x < n % m:
		print(n // m + 1, end=' ')
	else:
		print(n // m, end=' ')


import time
import collections

class Time_test:

	def __enter__(self):
		self.enter_time = time.time()

	def __exit__(self, exc_type, exc_val, exc_tb):
		print('Command was executed in', time.time() - self.enter_time)
(n, m) = [int(x) for x in input().split()]
print((str(n // m) + ' ') * (m - n % m) + (str(n // m + 1) + ' ') * (n % m))


(n, m) = map(int, input().split())
l = [n // m for i in range(m)]
z = n % m
for j in range(z):
	l[j] += 1
print(*l)


(n, m) = input().split()
n = int(n)
m = int(m)
t = n % m
if t == 0:
	for i in range(m):
		print(n // m, end=' ')
else:
	for i in range(m - t):
		print(n // m, end=' ')
	for i in range(t):
		print(n // m + 1, end=' ')


(n, m) = map(int, input().split())
lst = []
base_num = n // m
extra = n % m
for i in range(m):
	lst.append(base_num)
for j in range(extra):
	lst[j] += 1
lst.sort()
for k in lst:
	print(k, end=' ')
print()


(n, m) = map(int, input().split())
a = [0] * m
q = int(n / m)
r = n % m
for i in range(m):
	a[i] = q
for i in range(r):
	a[i] += 1
for x in a:
	print(x, end=' ')


(n, m) = map(int, input().split())
l = []
if n % m == 0:
	for i in range(m):
		l.append(int(n / m))
	print(' '.join((str(x) for x in l)))
else:
	sum = n % m
	for i in range(m):
		l.append(int(n / m))
	t = m - 1
	while sum:
		sum = sum - 1
		l[t] = l[t] + 1
		t = t - 1
	print(' '.join((str(x) for x in l)))


def main_function():
	(n, m) = [int(i) for i in input().split(' ')]
	ratio = n // m
	output_list = [str(ratio) for i in range(m)]
	left = n - ratio * m
	for i in range(left):
		output_list[i] = str(int(output_list[i]) + 1)
	return ' '.join(output_list)
print(main_function())


def solve():
	b = [n // m for _ in range(m)]
	x = n % m
	for i in range(x):
		b[i] += 1
	return ' '.join(map(str, b))

def main():
	global n, m
	(n, m) = map(int, input().split())
	print(solve())
main()


import math
(n, k) = map(int, input().split())
x = []
if n % k == 0:
	c = n // k
	for _ in range(k):
		x.append(c)
else:
	c = math.ceil(n / k)
	l = k * c
	d = l - n
	for _ in range(d):
		x.append(c - 1)
	for _ in range(k - d):
		x.append(c)
for i in x:
	print(i, end=' ')


import sys

def main():
	(n, m) = map(int, sys.stdin.read().strip().split())
	return [n // m] * (m - n % m) + [n // m + 1] * (n % m)
print(*main())


(n, m) = map(int, input().split())
li = []
i = 0
for j in range(m):
	li.append(0)
while True:
	if i >= m:
		i = 0
	li[i] += 1
	i += 1
	n -= 1
	if n == 0:
		break
for i in li:
	print(i, end=' ')


import sys
import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list or type(n) is str:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

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

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

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

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return int(str(n)[::-1])

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base=3):
	newnumber = ''
	while number > 0:
		newnumber = str(number % base) + newnumber
		number //= base
	return newnumber
(n, m) = mi()
ans = [n // m] * m
for i in range(n % m):
	ans[i] += 1
print(wr(ans))


(candies, friends) = map(int, input().split())
per_friend = candies // friends
rem = candies - friends * per_friend
ans = [per_friend] * (friends - rem) + [per_friend + 1] * rem
print(*ans)


(n, m) = map(int, input().split())
b = -(-n // m)
a = [b] * m
i = 0
while sum(a) != n:
	a[i] -= 1
	i += 1
print(*a)


(n, m) = map(int, input().split())
if n % m == 0:
	x = n // m
	print(*[x] * m)
if n % m != 0:
	x = n // m
	y = n % m
	z = [x + 1] * y
	z.extend([x] * (m - y))
	print(*z)


(n, m) = [int(i) for i in input().split(' ')]
min_candies = n // m
max_candies = min_candies + 1
max_candies_recievers = n % m
min_candies_recievers = m - max_candies_recievers
for i in range(m):
	if i < min_candies_recievers:
		print(min_candies, end=' ')
	else:
		print(max_candies, end=' ')


(n, m) = map(int, input().split())
r = n % m
if r == 0:
	print('{} '.format(n // m) * m)
else:
	a = n // m
	print('{} '.format(a + 1) * r + '{} '.format(a) * (m - r))


(n, m) = map(int, input().split())
ans = [0 for i in range(m)]
i = 0
while i < n:
	for j in range(m):
		i += 1
		ans[j] += 1
		if i >= n:
			break
ans.reverse()
print(*ans)


(a, b) = map(int, input().split())
l = []
while a > 0:
	l.append(a // b)
	a = a - a // b
	b = b - 1
c = len(l)
for i in range(c):
	print(l[i], end=' ')


(n, m) = list(map(int, input().split()))
answer = list()
ans = n / m
if n % m == 0:
	answer = list([n // m] * m)
else:
	min = n // m
	max = n // m + 1
	minList = list([min] * m)
	maxList = list([max] * m)
	for i in range(1, m):
		listSums = minList[:i] + maxList[i:]
		if sum(listSums) == n:
			answer = listSums
			break
out = ' '.join(map(str, answer))
print(out)


(n, k) = map(int, input().split())
r = n // k
resto = n % k
res = []
for i in range(k):
	if resto > 0:
		resto -= 1
		res.append(r + 1)
	else:
		res.append(r)
res.sort()
print(*res)


(a, b) = map(int, input().split())
z = a // b
print((str(z) + ' ') * (b - a % b) + (str(z + 1) + ' ') * (a % b))


(n, m) = input().split()
n = int(n)
m = int(m)
resDiv = n // m
temp = resDiv * m
temp = n - temp
temp = m - temp
for i in range(m):
	if temp == 0:
		print(resDiv + 1, end=' ')
	else:
		print(resDiv, end=' ')
		temp = temp - 1


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

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

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	(a, b) = LI()
	c = a // b
	ans = [c] * b
	a -= c * b
	for i in range(b):
		if a > 0:
			ans[i] += 1
			a -= 1
		else:
			break
	return ' '.join((str(x) for x in ans))
print(main())


(n, m) = map(int, input().split())
rem = n % m
q = n // m
i = 0
while i < rem:
	print(q + 1, end=' ')
	i += 1
i = 0
while i < m - rem:
	print(q, end=' ')
	i += 1


(n, m) = map(int, input().split())
li = [n // m for i in range(m)]
k = n % m
for i in range(k):
	li[i] += 1
print(*li)


(n, m) = map(int, input().split())
z = [n // m] * m
for k in range(n % m):
	z[k] += 1
for k in z:
	print(k, end=' ')


(candies, frnds) = map(int, input().split())
d = candies // frnds
if not candies % frnds:
	print(' '.join(map(str, [d] * frnds)))
else:
	r = candies % frnds
	a = [d] * frnds
	for i in range(frnds):
		if i == frnds - r:
			a[i] += 1
			r -= 1
	print(' '.join(map(str, a)))


(a, b) = list(map(int, input().split()))
d = a % b
e = a // b
l = []
for i in range(b):
	l.append(e)
for i in range(len(l) - 1, len(l) - d - 1, -1):
	l[i] = l[i] + 1
print(*l)


n = list(map(int, input().split()))
if n[0] % n[1] == 0:
	print((str(n[0] // n[1]) + ' ') * n[1])
else:
	s = n[0] // n[1]
	v = n[0] % n[1]
	b = v * (str(s + 1) + ' ')
	w = n[1] - v
	print(w * (str(s) + ' ') + b)


[n, m] = [int(s) for s in input().split(' ')]
share = n // m
rem = n % m
maxi = share + 1
ans = (str(maxi) + ' ') * rem + (str(share) + ' ') * (m - rem - 1) + str(share)
print(ans)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
L = inlt()
n = L[0]
m = L[1]
a = int(n / m)
b = n % m
if b == 0:
	for i in range(m):
		print(a, end=' ')
else:
	for i in range(m):
		if b != 0:
			print(a + 1, end=' ')
			b = b - 1
		else:
			print(a, end=' ')


nm = input().split()
n = int(nm[0])
m = int(nm[1])
b = n % m
for i in range(m):
	if b > i:
		print(n // m + 1, end=' ')
		continue
	print(n // m, end=' ')


(n, m) = map(int, input().split())
if n % m == 0:
	lst = [n // m] * m
else:
	lst = [n // m] * m
	p = n % m
	i = len(lst) - 1
	while p > 0:
		lst[i] += 1
		i = i - 1
		p = p - 1
for i in range(m):
	print(lst[i], end=' ')


(n, m) = map(int, input().split())
(x, y) = divmod(n, m)
print(*[x + 1] * y + [x] * (m - y))