import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class TestGen {

	class Test {
		int[] a;

		public Test(int... a) {
			this.a = a;
		}

	}

	private int testCount = 1;

	private void write(Test t) {
		try {
			++testCount;
			String filename = testCount / 10 + "" + testCount % 10;
			PrintWriter out = new PrintWriter(filename);
			out.println(t.a.length);
			for (int i = 0; i < t.a.length; i++) {
				out.print(t.a[i]);
				if (i != t.a.length - 1) {
					out.print(" ");
				}
			}
			out.println();
			System.err.println(testCount);
			out.flush();
			out.close();
		} catch (IOException ex) {
			throw new RuntimeException(ex);
		}
	}

	void myAssert(boolean b) {
		if (!b)
			throw new AssertionError();
	}

	fish_sm fishSm = new fish_sm();

	int solve(Test t) {
		return fishSm.solve(t.a);
	}

	static Random rand = new Random(2);
	final int MAXN = 10;
	final int MAXA = (int) 1e6;

	public void run() throws IOException {
		write(genRand(4, 1, 10));
		write(genRand(4, 1, MAXA));
		for (int i = 0; i < 10; i++) {
			write(genRand(4 + rand.nextInt(MAXN - 4 + 1), 1, MAXA));
		}
		write(genRand(MAXN, 0, MAXA));
		write(genEqual(MAXN, 1));
		write(genNegate(MAXN, 10));
		for (int j = 10; j >= 7; j--) {
			write(genNegate(j, 10));
		}
	}

	Test genNegate(int n, int x) {
		int it = 0;
		while (true) {
			Test t = genRand(4 + rand.nextInt(n - 4 + 1), 1, 1 + rand.nextInt(x));
			it++;
			if (it % 50 == 0) {
				System.err.print(".");
			}
			int r = solve(t);
			if (r < 0) {
				System.err.println(r + " " + it);
				return t;
			}
		}
	}

	Test genEqual(int n, int x) {
		int[] a = new int[n];
		Arrays.fill(a, x);
		return new Test(a);
	}

	Test genRand(int n, int l, int r) {
		int[] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = nextInt(l, r);
		}
		return new Test(a);
	}

	int nextInt(int l, int r) {
		return l + rand.nextInt(r - l + 1);
	}

	public static void main(String[] args) throws IOException {
		new TestGen().run();
	}

}
