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

public class TestGen {

	PrintWriter out;
	Random rnd;
	int tNumber;

	class Test {
		int k, a, x, y;
		String strat;

		public Test(int k, int a, int x, int y, String strat) {
			this.k = k;
			this.a = a;
			this.x = x;
			this.y = y;
			this.strat = strat;
		}

		void printTest() throws IOException {
			if (tNumber < 10)
				out = new PrintWriter("../tests/0" + tNumber);
			else
				out = new PrintWriter("../tests/" + tNumber);
			tNumber++;

			out.println(k);
			out.println(a);
			out.println(x + " " + y);
			out.println(strat);

			out.close();
		}
	}

	public void solve() throws IOException {
		genSample();
		tNumber = 2;
		rnd = new Random(31);

		new Test(3, 1, 1, 3, "camperOne").printTest();
		new Test(3, 1, 1, 3, "camperTwo").printTest();
		new Test(3, 1, 1, 3, "random").printTest();
		new Test(3, 1, 1, 3, "check").printTest();
		new Test(3, 1, 1, 3, "nearest").printTest();
		new Test(3, 1, 1, 3, "before").printTest();

		int a = rnd.nextInt(99) + 1;
		new Test(99, a, 45, 45, "camperOne").printTest();
		new Test(99, a, 45, 45, "camperTwo").printTest();
		new Test(99, a, 45, 45, "random").printTest();
		new Test(99, a, 45, 45, "check").printTest();
		new Test(99, a, 45, 45, "nearest").printTest();
		new Test(99, a, 45, 45, "before").printTest();

		new Test(99, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, "camperOne").printTest();
		new Test(99, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, "camperTwo").printTest();
		new Test(99, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, "random").printTest();
		new Test(99, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, "check").printTest();
		new Test(99, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, "nearest").printTest();
		new Test(99, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, rnd.nextInt(99) + 1, "before").printTest();

		
	}

	void genSample() throws FileNotFoundException {
		out = new PrintWriter("../tests/01");
		out.print("4\r\n1\r\n4 4\r\nrandom\r\n");
		out.close();
	}

	public void run() {
		try {

			solve();

		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new TestGen().run();
	}
}
