uses
  sysutils;
var
  n, k, d, q, i: integer;
begin
  n := strtoint(paramstr(1));
  k := strtoint(paramstr(2));
  d := strtoint(paramstr(3));
  randseed := n * 239 + k + d;
  if (d < 0) then begin
    d := -d;
    q := random(1000000000 - d * k + 1) + 1;
    writeln(n, ' ', k);
    for i := 1 to n do begin
      if (i > 1) then write(' ');
      if (random(100) = 0) then begin
        write(q + ((n - i + 1) mod d) * k);
//        writeln('!');
      end else begin
        write(q + ((n - i) mod d) * k);
      end;
    end;
    writeln;
  end else begin
    q := random(1000000000 - d * k + 1) + 1;
    writeln(n, ' ', k);
    for i := 1 to n do begin
      if (i > 1) then write(' ');
      if (random(100) = 0) then begin
        write(q + ((i - 2) mod d) * k);
//        writeln('!');
      end else begin
        write(q + ((i - 1) mod d) * k);
      end;
    end;
    writeln;
  end;
end.