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

public class TestsGen {
	
	static int done = 0;
	static final long MAX_VALUE = (long)1e10;
	static final Random rand = new Random(556668949239L);

	static void print(long 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("2");
        out.close();
		out = new PrintWriter("../preliminary/02");
        out.println("36");
        out.close();
	}

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

		genSimple();

        // First group
        print(1);
        print(5);
        print(18);
        print(243);
        print(665);

        print(996);
        print(997);
        print(998);
        print(999);
        print(1000);
        
        // Second group
        print((long)5e7 + (long)rand.nextInt((int)5e7));
        print((long)6e7);
        print((long)1e8);
        print((long)1e8 - 1);
        print((long)1e8 - 2); 
        
        print(MAX_VALUE / 2 + (rand.nextLong() % (MAX_VALUE / 2) + MAX_VALUE / 2) % (MAX_VALUE / 2));
        print(MAX_VALUE / 2 + (rand.nextLong() % (MAX_VALUE / 2) + MAX_VALUE / 2) % (MAX_VALUE / 2));
        print(MAX_VALUE - 2);
        print(MAX_VALUE - 1);
        print(MAX_VALUE);
	}
}
