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

// Version 1.0 Stable

public class Gen {

	static int done = 0;

	static final Random rand = new Random(556668949239L);

	static final int MAX1 = 10;
	static final int MAX2 = 200;
	static final int MAX3 = 1000;

	static ArrayList<Integer> data = new ArrayList<Integer>();

	static void print(int k) throws IOException {
		done++;
		System.err.println(done);
		PrintWriter out;
		if (done < 10)
			out = new PrintWriter("../tests/0" + String.valueOf(done));
		else
			out = new PrintWriter("../tests/" + String.valueOf(done));

		out.println(k);
		out.close();
	}

	static void genSimple() throws IOException {
		PrintWriter out;
		out = new PrintWriter("../preliminary/01");
		out.println("1");
		out.close();
		out = new PrintWriter("../preliminary/02");
		out.println("2");
		out.close();

		out = new PrintWriter("../preliminary/03");
		out.println("3");
		out.close();
		out = new PrintWriter("../preliminary/04");
		out.println("7");
		out.close();
	}

	public static void main(String[] args) throws IOException {
		boolean f = (new File("../preliminary")).mkdir();
		f = new File("../tests").mkdir();

		genSimple();

		done = 0;

		// Small test case
		for (int i = 1; i <= MAX1; i++)
			data.add(i);
		Collections.shuffle(data, rand);
		for (int i = 0; i < MAX1; i++)
			print(data.get(i));
		data.clear();

		// Middle tests case
		print(MAX2);
		print(100);
		print(108);
		print(128);
		print(150);
		print(42);
		print(23);
		for (int i = 0; i < 5; i++)
			print(50 + rand.nextInt(150));

		// Big tests case
		print(MAX3);
		print(239);
		print(555);
		print(666);
		print(777);
		print(888);
		print(999);
		print(997);
		print(998);
		print(988);
		for (int i = 0; i < 10; i++)
			print(MAX3 / 2 + rand.nextInt(MAX3 / 2));

		return;
	}
}
