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

public class TestsGen {
	static int testcount = 0;

	static int maxSize = 256 * 1024;
	
	static HashSet<Long> hs = new HashSet<Long>();

	static Random random = new Random(5668173);
	
	static boolean bad(long t) {
		for (int i = 2; i <= 1000; i++) {
			while (t % i == 0){
				t /= i;
			}
		}
		return t != 1;
	}

	static void writeRand(int n) throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		long t = random.nextLong();
		if (n <= Integer.MAX_VALUE) {
			t = random.nextInt((int)n);
		}
		while (hs.contains(t) || bad(t) || t > n || t <= 0) {
			t = random.nextLong();
			if (n <= Integer.MAX_VALUE) {
				t = random.nextInt((int)n);
			}
		}
		out.println(t);
		hs.add(t);
		System.out.println(testcount);
		out.close();
	}

	static void writePrime(int n) throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		boolean[] q = new boolean[n + 1];
		for (int i = 2; i <= n; i++) {
			if (!q[i]) {
				for (int j = 2 * i; j <= n; j += i ) {
					q[j] = true;
				}
			}
		}
		long ans = 1;
		for (int i = 2; i <= n; i++) {
			if (!q[i]) {
				ans *= i;
			}
		}
		out.println(ans);
		hs.add(ans);
		out.close();
	}

	static void writeRand2(long n) throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		boolean[] q = new boolean[1001];
		for (int i = 2; i <= 1000; i++) {
			if (!q[i]) {
				for (int j = 2 * i; j <= 1000; j += i ) {
					q[j] = true;
				}
			}
		}
		double ans = 1;
		for (int i = 2; i <= 1000; i++) {
			if (!q[i]) {
				int st = random.nextInt(10);
				for (int j = 0; j < st && ans * i <= 1e16; j++) {
					ans *= i;
				}
			}
		}
		out.println((long)ans);
		hs.add((long)ans);
		out.close();
	}

	public static void main(String[] args) throws IOException {
		if (args != null && args.length > 0) {
			testcount = Integer.parseInt(args[0]);
		}
		for (int i = 0; i < testcount; i++) {
			Scanner in = new Scanner(new File(String.format("%02d", i + 1) + ".t"));
			hs.add(in.nextLong());
		}
		writePrime(5);
		writePrime(11);
		writePrime(23);
		for (int i = 0; i < 10; i++) {
			writeRand(100);
		}
		for (int i = 0; i < 10; i++) {
			writeRand(1000000);
		}
		for (int i = 0; i < 10; i++) {
			writeRand2((long)1e18);
		}
	}
}
