program waterfire;
const
fin='dataa.in';
fout='dataa.out';
type
b=array[1..6] of longint;
var
n,m,i,j,s:longint;
n1,m1:real;
a:b;
f,g:text;
procedure switch(x:b);
var
i,j:longint;
begin
s:=m-1;
if (x[s+1]-x[s]=1)or(x[s]=x[s+1]) then
begin
dec(s);
inc(x[s]);
x[s+1]:=x[s];
x[s+2]:=n-x[s]-x[s+1];
end else
begin
inc(x[s]);
dec(x[s+1]);
end;
if x[1]+x[2]+x[3]+x[4]+x[5]+x[6]=n then
for j:= 1 to m-1 do
write(g,x[j],' ');
write(g,x[m]);
writeln(g);
if (x[s]>=trunc(n/m))and(s=1) then
begin
close(g);
halt;
end;
switch(x);
end;
begin
assign(f,fin);reset(f);
assign(g,fout);rewrite(g);
read(f,n,m);
close(f);
n1:=n;
m1:=m;
s:=m-1;
a[m]:=n-m+1;
for i:= 1 to m-1 do
begin
a[i]:=1;
write(g,a[i],' ');
end;
writeln(g,a[m]);
switch(a);
end.