//na :cuixiaofei;
//da :08_04_22;
program dataa;
var
a :array[0..30] of longint;
n,m :longint;
f1,f2 :text;
procedure init;
begin
assign(f1,'dataa.in');
reset(f1);
assign(f2,'dataa.out');
rewrite(f2);
readln(f1,n,m);
a[0]:=1;
end;
procedure sou(h,ge:longint);
var
i :longint;
begin
if ge>m then
begin
for i:=1 to m-1 do
write(f2,a[i],' ');
writeln(f2,a[m]);
end
else
begin
if ge<m then
begin
for i:=a[ge-1] to n do
if (h-(m-ge+1)*i>=0) then
begin
a[ge]:=i;
sou(h-a[ge],ge+1);
a[ge]:=0;
end
else
break;
end
else
begin
a[ge]:=h;
sou(0,ge+1);
end;
end;
end;
procedure main;
begin
sou(n,1);
close(f1);
close(f2);
end;
begin
init;
main;
end.