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

public class railway_gen {

	public static void main(String[] args) throws IOException {
		Random rand = new Random(9013487);
		for (int test = 1; test <= 25; test++) {
			PrintWriter out = new PrintWriter((test < 10 ? "0" : "") + test);
			switch (test) {
			case 1:
				out.println("3");
				out.println("3 4 5");
				out.println("1 2 3");
				out.println("1 3");
				out.println("5 2 3 4");
				break;
			case 2:
				out.println("3");
				out.println("5 6 7");
				out.println("1 1 1");
				out.println("1 0");
				out.println("1 2 3 5");
				break;
			case 3:
				out.println("3");
				out.println("998 999 1000");
				out.println("1 1 1");
				out.println("0 3");
				out.println("1000 1000 1000 1000");
				break;
			case 4:
				out.println("3");
				out.println("998 999 1000");
				out.println("1 1 1");
				out.println("3 1");
				out.println("1000 1000 1000 1");
				break;
			case 5:
				out.println("3");
				out.println("1 2 3");
				out.println("1 2 3");
				out.println("2 0");
				out.println("1 1 1 1");
				break;
			case 6:
			case 7:
			case 8:
			case 9:
			case 10:
			case 11:
			case 12: {
				out.println("50");
				for (int i = 1; i <= 50; i++) {
					if (i > 1) {
						out.print(" ");
					}
					out.print((1000 * i / 50));
				}
				out.println();
				for (int i = 0; i < 50; i++) {
					if (i > 0) {
						out.print(" ");
					}
					out.print(i * (test % 2) + 1);
				}
				out.println();
				int s = rand.nextInt(51);
				int t = rand.nextInt(51);
				if (test % 4 == 1) {
					s = 0;
					t = 50;
					if (rand.nextBoolean()) {
						s = 50;
						t = 0;
					}
				}
				while (s == t) {
					t = rand.nextInt(51);
				}
				out.println(s + " " + t);
				if (test % 3 == 0) {
					out.println("1000 1 1000 1");
				} else {
					out.println((1 + rand.nextInt(1000)) + " "
							+ (1 + rand.nextInt(1000)) + " "
							+ (1 + rand.nextInt(1000)) + " "
							+ (1 + rand.nextInt(1000)));
				}
			}
				break;

			default:
				int n = 3 + rand.nextInt(48);
				int[] d = new int[n];
				boolean[] q = new boolean[1001];
				for (int i = 0; i < n; i++) {
					while (true) {
						int x = 1 + rand.nextInt(1000);
						if (!q[x]) {
							q[x] = true;
							break;
						}
					}
				}
				int j = 0;
				for (int i = 0; i < q.length; i++) {
					if (q[i]) {
						d[j++] = i;
					}
				}
				Arrays.sort(d);
				int[] z = new int[n];
				z[0] = 1;
				for (int i = 1; i < z.length; i++) {
					if (rand.nextInt(10) < 6) {
						z[i] = z[i - 1] + 1;
					} else {
						z[i] = z[i - 1];
					}
				}
				int s = rand.nextInt(n + 1);
				int t = rand.nextInt(n + 1);
				while (s == t) {
					t = rand.nextInt(n + 1);
				}
				int c1 = 1 + rand.nextInt(1000);
				int c2 = 1 + rand.nextInt(1000);
				int c3 = 1 + rand.nextInt(1000);
				int r = 1 + rand.nextInt(1000);
				out.println(n);
				for (int i = 0; i < d.length; i++) {
					if (i > 0) {
						out.print(" ");
					}
					out.print(d[i]);
				}
				out.println();
				for (int i = 0; i < z.length; i++) {
					if (i > 0) {
						out.print(" ");
					}
					out.print(z[i]);
				}
				out.println();
				out.println(s + " " + t);
				out.println(c1 + " " + c2 + " " + c3 + " " + r);
				break;
			}
			out.close();
		}
	}
}
