import java.io.*;
import java.util.*;

public class TestsGen implements Runnable {
	public static void main(String[] args) {
		if (args.length < 1) {
			for (I = 1; (new File(getName(I) + ".t")).exists(); I++)
				;
		} else {
			I = Integer.parseInt(args[0]);
		}
		new Thread(new TestsGen()).start();
	}

	PrintWriter out;

	Random rand = new Random(6439586L);

	static int I;

	static String getName(int i) {
		return ((i < 10) ? "0" : "") + i;
	}

	void open() {
		try {
			System.out.println("Generating test " + I);
			out = new PrintWriter(getName(I));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}

	void close() {
		out.close();
		I++;
	}
	
	final String ALPHA = "abcdefghijklmnopqrstuvwxyz";

	String randString(int len, String alpha) {
		StringBuilder ans = new StringBuilder();
		int k = alpha.length();
		for (int i = 0; i < len; i++) {
			ans.append(alpha.charAt(rand.nextInt(k)));
		}
		return ans.toString();
	}


	long rand(long l, long r) {
		return l + (rand.nextLong() >>> 1) % (r - l + 1);
	}

	int rand(int l, int r) {
		return l + rand.nextInt(r - l + 1);
	}
	
	final int MAX_N = 100;
	final int MAX = 100;
	
	void genTest(int n, int M) {
		open();
		out.println(n + " " + rand(1, n));
		for (int i = 0; i < n; ++i) {
			if (i > 0) out.print(" ");
			out.print(rand(1, M));
		}
		out.println();
		close();
	}
	
	void genPlain(int n, int M) {
		open();
		out.println(n + " " + rand(1, n));
		for (int i = 0; i < n; ++i) {
			if (i > 0) out.print(" ");
			out.print(M);
		}
		out.println();
		close();
	}
	
	void solve() {
		genTest(1, 1);
		for (int i = 0; i < 5; ++i) {
			genTest(rand(1, 5), 5);
			genPlain(rand(1, 5), rand(1, 5));
		}
		for (int i = 0; i < 10; ++i) {
			genTest(rand(MAX_N / 2, MAX_N), MAX);
			
		}
		genPlain(MAX_N, 1);
		genPlain(MAX_N, MAX);
		genPlain(MAX_N, MAX / 2);
	}

	
	void myAssert(boolean e) {
		if (!e) {
			throw new Error("Assertion failed");
		}
	}

	public void run() {
		try {
			solve();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}
}