uses dorand;
var i:integer;
const minlongint=-maxlongint-1;
begin
  regint (97);
  writeln (500);
  for i:=1 to 500 do writeln (lr (1, 239));
  writeln (500);
  for i:=1 to 500 do writeln (lr (1, 239));
end.