import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Random;

public class gen_bigsum {
	public static void main(String[] args) {
		new gen_bigsum().produceTests();
	}

	Random rand = new Random(135676245L);

	long BOUND = (long) 1e12;
	long BOUND2 = (long) 1e5;
	long LOW = (long) 1e9;

	private void produceTests() {
		findSomePrimes();
		genTest(2);
		genTest(3);
		genTest(6);
		genTest(8);
		genTest(12);
		for (int i = 0; i < 3; i++) {
			int z = primes.get(rand.nextInt(primes.size()));
			while (z > BOUND2) {
				z = primes.get(rand.nextInt(primes.size()));
			}
			genTest(z);
		}
		genTest(BigInteger.valueOf(459218795132L).nextProbablePrime()
				.longValue());
		genTest(BigInteger.valueOf(983459827345L).nextProbablePrime()
				.longValue());
		genTest(BigInteger.valueOf(123459823459L).nextProbablePrime()
				.longValue());
		genTest(BigInteger.valueOf(8927349223L).nextProbablePrime().longValue() * 24);
		genTest(BigInteger.valueOf((long) BOUND - 20).nextProbablePrime()
				.longValue());
		genTest(1L << 39);
		genTest(Math.round(Math.pow(3, 25)));
		long x = 1;
		for (int i = 0; i < primes.size() && x * primes.get(i) <= BOUND; i++) {
			x *= primes.get(i);
		}
		genTest(x);
		x = 1;
		for (int i = 0; i < primes.size() && x * primes.get(i) <= BOUND2; i++) {
			x *= primes.get(i);
		}
		genTest(x);
		getHighestDivisible2(1, 0, 1);
		genTest(best);
		ans = 1;
		best = 1;
		getHighestDivisible(1, 0, 1);
		genTest(best);
		genTest(BOUND);
		genTest(BOUND2);
		for (int i = 0; i < 5; i++) {
			while (true) {
				long p = primes.get(rand.nextInt(primes.size()));
				int deg = 1;
				long q = p;
				while (q * p <= BOUND) {
					q *= p;
					deg++;
				}
				int z = deg / 2 + rand.nextInt(Math.max(1, deg / 2));
				x = 1;
				for (int j = 0; j < z; j++) {
					x *= p;
				}
				if (x >= LOW) {
					break;
				}
			}
			genTest(x);
		}
		for (int i = 0; i < 5; i++) {
			while (true) {
				long p = primes.get(rand.nextInt(primes.size()));
				int deg = 1;
				long q = p;
				while (q * p <= BOUND2) {
					q *= p;
					deg++;
				}
				int z = 1 + rand.nextInt(deg);
				x = 1;
				for (int j = 0; j < z; j++) {
					x *= p;
				}
				if (z > 1 && x <= BOUND2) {
					break;
				}
			}
			genTest(x);
		}
		for (int i = 0; i < 5; i++) {
			x = 1 + rand.nextInt((int) BOUND2);
			genTest(x);
		}
		for (int i = 0; i < 2; i++) {
			x = BigInteger.valueOf(Math.abs(rand.nextLong()) % BOUND)
					.nextProbablePrime().longValue();
			while (x < 1 || x > BOUND) {
				x = BigInteger.valueOf(Math.abs(rand.nextLong()) % BOUND)
						.nextProbablePrime().longValue();
			}
			genTest(x);
		}
		while (test < 50) {
			x = rand.nextLong() % (BOUND + 1);
			while (x < 1 || x > BOUND) {
				x = rand.nextLong() % (BOUND + 1);
			}
			genTest(x);
		}
	}

	long ans = 1;
	long best = 1;

	private void getHighestDivisible(long x, int i, long d) {
		if (x > BOUND) {
			return;
		}
		if (d > ans) {
			ans = d;
			best = x;
		}
		if (i >= 10) {
			return;
		}
		for (int j = 0; x <= BOUND; j++) {
			getHighestDivisible(x, i + 1, d * (j + 1));
			x *= primes.get(i);
		}
	}

	private void getHighestDivisible2(long x, int i, long d) {
		if (x > BOUND2) {
			return;
		}
		if (d > ans) {
			ans = d;
			best = x;
		}
		if (i >= 10) {
			return;
		}
		for (int j = 0; x <= BOUND2; j++) {
			getHighestDivisible(x, i + 1, d * (j + 1));
			x *= primes.get(i);
		}
	}

	int test = 0;

	private void genTest(long x) {
		test++;
		System.out.println(test);
		try {
			PrintWriter out = new PrintWriter((test / 10) + "" + (test % 10));
			out.println(x);
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	private void findSomePrimes() {
		boolean[] q = new boolean[10000000];
		primes = new ArrayList<Integer>();
		for (int i = 2; i < q.length; i++) {
			if (!q[i]) {
				primes.add(i);
				for (int j = 2 * i; j < q.length; j += i) {
					q[j] = true;
				}
			}
		}
	}

	ArrayList<Integer> primes;
}
