Uses SysUtils;

const MaxGreen = 1000000000;

var test_number, n, g, r: longint;
    a: array of longint;

procedure print(n, g, r: longint);
var s: string;
    i: longint;
begin
	if (test_number < 10) then s :='0' + IntToStr(test_number)
	else s := IntToStr(test_number);
	rewrite(output, s);
	writeln(n, ' ', g, ' ', r);
    for i := 1 to n - 1 do
        write(a[i], ' ');
    writeln(a[n]);     
	inc(test_number);
	close(output);
end;

procedure genMin;
begin
    n := 1; g := random(10) + 1; r := random(10) + 1;
    setlength(a, n + 1);
    a[1] := random(g);
    print(n, g, r);
end;

procedure genMaximum;
var i: longint;
begin
    n := 1000; g := 1000000000; r := g;
    setlength(a, n + 1);
    for i := 1 to n do
        a[i] := g;
    print(n, g, r);
end;

procedure genMinMax(z: longint);
var i: longint;
begin
    n := 1000; g := 1000000000; r := 1000000000;
    setlength(a, n + 1);
    for i := 1 to n do
        a[i] := random(z);
    print(n, g, r);
end;

procedure genMax(MaxN, MaxG, MaxR: longint);
var i: longint;
begin
    n := random(MaxN div 2) + MaxN div 2 + 1; 
    g := random(MaxG div 2) + MaxG div 2 + 1; 
    r := random(MaxR div 2) + MaxR div 2 + 1;
    setlength(a, n + 1);
    for i := 1 to n do
        a[i] := g div 2 + random(g div 2);
    print(n, g, r);
end;

procedure genRand(MaxN, MaxG, MaxR: longint);
var i: longint;
begin
    n := random(MaxN div 2) + MaxN div 2 + 1; 
    g := random(MaxG div 2) + MaxG div 2 + 1; 
    r := random(MaxR div 2) + MaxR div 2 + 1;
    setlength(a, n + 1);
    for i := 1 to n do
        a[i] := g div 10 + random(g div 10 * 9);
    print(n, g, r);
end;

begin
	randomize;
	randseed := 579279;
    test_number := 1;

    genMin;
    genMinMax(239);
    genMinMax(2);
    genMaximum;
    genRand(10, 1000, 1000);

    genMax(10, 1000, 1000);
    genRand(100, 20000, 100000);
    genRand(100, 500000, 100000);
    genRand(100, 100000, 500000);
    genRand(100, 100, 100);

    genRand(10, 1000, 1000);
    genMax(100, 1000, 1000);
    genRand(1000, 5, 5);
    genMax(1000, 1000, 1000);
    genRand(1000, 10, 10);

    genRand(500, 100000, 100000);
    genRand(100, 50000000, 20000000);
    genRand(100, 2000000, 50000000);
    genMax(1000, MaxGreen, MaxGreen);
    genRand(1000, MaxGreen, MaxGreen);

    genRand(1000, MaxGreen, MaxGreen);
    genMax(1000, MaxGreen, 1000);
    genRand(1000, MaxGreen, 1000);
    genMax(1000, 1000, MaxGreen);
    genRand(1000, 1000, MaxGreen);

end.