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

public class TestsGen {
	static int testcount = 0;
	
	static class Test {
		int n;
		int k;
		int[] a;
		int[] b;
		public Test(int n, int k, int[] a, int[] b) {
			this.n = n;
			this.k = k;
			this.a = a;
			this.b = b;
		}
	}

	static Random random = new Random(4897344);

	static void write(Test test) throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		out.println(test.n + " " + test.k);
		for (int i = 0; i < test.n; i++) {
			if (i > 0) {  
				out.print(" ");
			}
			out.print(test.a[i]);
		}
		out.println();
		for (int i = 0; i < test.n; i++) {
			if (i > 0) {  
				out.print(" ");
			}
			out.print(test.b[i]);
		}
		out.println();
		out.close();
	}

	static Test random(int n, int k) {
		if (n <= k) {
			throw new RuntimeException("");
		}
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = random.nextInt(k);
			b[i] = random.nextInt(k);
		}
		return new Test(n, k, a, b);
	}

	public static void main(String[] args) throws IOException {
		while (new File(String.format("%02d.t", testcount + 1)).exists()) {
			testcount++;
		}
		for (int i = 1; i <= 10; i++) {
			write(random(i + 1, i));
		}
		for (int i = 0; i < 5; i++) {
			write(random(1000, 999));
		}
		for (int i = 0; i < 15; i++) {
			int n = 1 + random.nextInt(1000);
			if (n == 1) {
				n = 2;
			}
			int k = 1 + random.nextInt(n - 1);
			write(random(n, k));	
		}
	}

}
