const
	maxn = 50;
var
	n, k, i, j: longint;
	a: array [1..maxn] of longint;


procedure generate(i, j: longint);
var
	p: longint;
begin
	if i > 2 * n then begin
		writeln(n, ' ', 1);
		writeln(1, ' ', -1);
		for i := 1 to 2 * n do begin
			write(a[i]);
			if (i < 2 * n) then
				write(' ');
		end;
		writeln;
		writeln(n, ' ', 1);
		writeln(-1, ' ', 1);
		for i := 1 to 2 * n do begin
			write(a[i]);
			if (i < 2 * n) then
				write(' ');
		end;
		writeln;
		exit;
	end;

	if 2 * n - i >= j + 1 then begin
		a[i] := 1;
		generate(i + 1, j + 1);
	end;
	if (j > 0) then begin
		a[i] := -1;
		generate(i + 1, j - 1);
	end
end;

begin
	n := 5;
	writeln(84);
	generate(1, 0);
end.