var
  t, i, n, j : integer;
  k : int64;
begin
  reset(input, 'inverse.in');
  rewrite(output, 'inverse.out');
  read(n, k);
  assert((1 <= n) and (n <= 100000));
  assert((0 <= k) and (k <= int64(n) * (n - 1) div 2));
  i := n;
  while (i >= 1) and (k >= i - 1) do begin
    write(i, ' ');
    k := k - (i - 1);
    i := i - 1;
  end;
  t := 1;
  for j := 1 to i do begin
    if (j <> i - k) then begin
      write(t, ' ');
      t := t + 1;
    end else begin
      write(i, ' ');
    end;
  end;
end.