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

public class TestsGen {
	static int testcount = 0;
	
	static long MAX = (long) 1e18;

	static Random random = new Random(9573475);

	static void write(long[] a) throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		System.out.println("Generating test #" + testcount);
		for (int i = 0; i < a.length; i++) {
			if (i > 0) {
				out.print(" ");
			}
			out.print(a[i]);
		}
		out.println();
		out.close();
	}
	
	static void writeRand(long max) throws IOException {
		long[] a = new long[5];
		for (int i = 0; i < 5; i++) {
			a[i] = Math.abs(random.nextLong()) % (max + 1);
		}
		write(a);
	}

	static void writeRand2(long max) throws IOException {
		long[] a = new long[5];
		for (int i = 0; i < 5; i++) {
			a[i] = Math.abs(random.nextLong()) % (max + 1);
			while (i == 3 && a[3] < a[1] + 2 * a[2]) {
				a[i] = Math.abs(random.nextLong()) % (3 * max + 1);
			}
		}
		write(a);
	}

	static void writeMAX(long max) throws IOException {
		long[] a = new long[5];
		for (int i = 0; i < 5; i++) {
			a[i] = max;
		}
		write(a);
	}

	public static void main(String[] args) throws IOException {
		while (new File(String.format("%02d.t", testcount + 1)).exists()) {
			testcount++;
		}
		writeMAX(1);
		for (int i = 0; i < 5; i++) {
			writeRand(10);
			writeRand2(10);
		}
		writeMAX(4);
		writeMAX(10);
		for (int i = 0; i < 5; i++) {
			writeRand(1000000);
		}
		for (int i = 0; i < 5; i++) {
			writeRand(MAX);
			writeRand2(MAX / 3);
		}
		writeMAX(MAX);
	}

}
