import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Random;

public class gen_airplane {
	static PrintWriter out;
	static int test = 0;
	static Random rand = new Random(56856445);

	public static void main(String[] args) {
		genFirstBlock();
		genSecondBlock();
		out.close();
	}

	private static void genFirstBlock() {
		smallestTest();
		hugeSmallestTest();
		strangeTest();
		noSoRandom();
		noSoRandom();
		noSoRandom();
		randomSmallTest();
		randomSmallTest();
	}

	private static void noSoRandom() {
		next();
		int M = 1 + rand.nextInt(10000);
		int n = 100;
		int[] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = 5 + rand.nextInt(100 - 4);
		}
		int sum = M;
		for (int i = 0; i < a.length; i++) {
			sum += a[i];
		}
		ArrayList<Integer> al = new ArrayList<Integer>();
		for (long x = 1; x < 1000; x++) {
			if (sum * 1000 * x % (1000 - x) == 0
					&& sum * 1000 * x % (1000 - x) <= 1e6) {
				al.add((int) x);
			}
		}
		out.println(M + " " + n + " " + al.get(rand.nextInt(al.size())));
		for (int i = 0; i < a.length; i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print(a[i]);
		}
		out.println();
	}

	private static void strangeTest() {
		next();
		out.println("10000 100 999");
		for (int i = 0; i < 100; i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print("100");
		}
		out.println();
	}

	private static void smallestTest() {
		next();
		for (int al = 1; al <= 1000; al++) {
			int total = 6000 / (1000 - al);
			if (total * (1000 - al) / 1000 == 6) {
				out.println("1 1 " + al);
				out.println("5");
				return;
			}
		}
	}

	private static void hugeSmallestTest() {
		next();
		out.print("10000 100 ");
		int sum = 10000 + 100 * 100;
		for (int al = 1; al <= 1000; al++) {
			int total = sum * 1000 / (1000 - al);
			if (total * (1000 - al) / 1000 == sum) {
				out.println(al);
				break;
			}
		}
		for (int i = 0; i < 100; i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print("100");
		}
		out.println();
	}

	private static void randomSmallTest() {
		next();
		int ans = 1 + rand.nextInt((int) 1e6);
		ArrayList<Integer> al = new ArrayList<Integer>();
		for (int i = 1; i <= 1000; i++) {
			if (ans * 1000 % i == 0 && ans * 1000 / i <= 10000 + 100 * 100) {
				al.add(i);
			}
		}
		while (al.size() == 0) {
			ans = 1 + rand.nextInt((int) 1e6);
			al = new ArrayList<Integer>();
			for (int i = 1; i <= 1000; i++) {
				if (ans * 1000 % i == 0 && ans * 1000 / i <= 10000 + 100 * 100) {
					al.add(i);
				}
			}
		}
		int a = al.get(rand.nextInt(al.size()));
		int all = ans * 1000 / a;
		int M = 1 + rand.nextInt(10000);
		while (all - M < 5 || (all - M) / 100 > 100) {
			M = 1 + rand.nextInt(10000);
		}
		int people = all - M;
		ArrayList<Integer> humans = new ArrayList<Integer>();
		while ((100 - humans.size() - 1) * 100 >= people - 5) {
			int x = 5 + rand.nextInt(100 - 4);
			if (x > people) {
				people = x;
			}
			humans.add(x);
			people -= x;
		}
		while (people > 0) {
			int x = Math.min(people, 100);
			humans.add(x);
			people -= x;
		}
		out.println(M + " " + humans.size() + " " + a);
		for (int i = 0; i < humans.size(); i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print(humans.get(i));
		}
		out.println();
	}

	private static void genSecondBlock() {
		verySmall();
		noSoSmall();
		bigger();
		pureRandom();
		failTest();
		pureRandom();
		pureRandom();
		failTest();
		pureRandom();
		failTest();
		pureRandom();
		pureRandom();
	}

	private static void failTest() {
		next();
		int M = 1 + rand.nextInt(10000);
		int n = 1 + rand.nextInt(100);
		int[] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = rand.nextInt(100 - 4) + 5;
		}
		int al = 1000;
		out.println(M + " " + n + " " + al);
		for (int i = 0; i < a.length; i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print(a[i]);
		}
		out.println();
	}

	private static void pureRandom() {
		next();
		int M = 1 + rand.nextInt(10000);
		int n = 1 + rand.nextInt(100);
		int[] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = rand.nextInt(100 - 4) + 5;
		}
		int al = 1 + rand.nextInt(1000);
		out.println(M + " " + n + " " + al);
		for (int i = 0; i < a.length; i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print(a[i]);
		}
		out.println();
	}

	private static void bigger() {
		next();
		out.println("10000 100 1");
		for (int i = 0; i < 100; i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print("100");
		}
		out.println();
	}

	private static void noSoSmall() {
		next();
		out.println("10000 1 1000");
		out.println("100");
	}

	private static void verySmall() {
		next();
		out.println("1 1 1");
		out.println("5");
	}

	static void next() {
		if (out != null) {
			out.close();
		}
		test++;
		try {
			out = new PrintWriter((test / 10) + "" + (test % 10));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}
}
