
const
	MAXN = 1000000;

var
	a : array [0 .. MAXN] of integer;
	n, i, j, t : integer;
	k : int64;


begin
	reset(input, 'inverse.in');
	rewrite(output, 'inverse.out');
	read(n, k);
	for i := 1 to n do begin
	    a[i] := i;
	end;
	i := 1;
	while (k > 0) do begin
		j := i;
		while (j > 1) and (k > 0) do begin
			t := a[j];
			a[j] := a[j - 1];
			a[j - 1] := t;
			dec(k);
			dec(j);
		end;
		inc(i);
	end;
	for i := 1 to n do begin
	    if (i > 1) then
	    	write(' ');
	    write(a[i]);
	end;
	writeln;
	close(input);
	close(output);
end.