{$apptype console}

const
  n = 100;
  k = 19;

var d, num: array[1..100]of longint;
    i: longint;

begin
  randseed := 17;

  for i := 1 to k do begin
    num[2 * i - 1] := i;
    num[2 * i] := i;
    d[2 * i - 1] := random(101);
    d[2 * i] := random(101);
  end;
  for i := 2 * k + 1 to n - 1 do begin
    num[i] := k + 2 + random(99 - k);
    d[i] := random(101);
  end;
  d[n] := random(101);

  writeln(n);
  for i := 1 to n do begin
    if i > 1 then begin
      write(' ');
    end;
    write(d[i]);
  end;
  writeln;
  for i := 1 to n - 1 do begin
    if i > 1 then begin
      write(' ');
    end;
    write(num[i]);
  end;
  writeln;
end.