import static java.lang.System.exit;
import static java.math.BigInteger.probablePrime;

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

public class TestsGen {
	static final long[] F;
	static final long MAXN = 1000000000L * 1000000000L;
	static final Random rand = new Random(1231734L);
	static {
		List<Long> f = new ArrayList<Long>();
		f.add(1L);
		f.add(2L);
		while (true) {
			long next = f.get(f.size() - 1) + f.get(f.size() - 2);
			if (next > MAXN) {
				break;
			}
			f.add(next);
		}
		F = new long[f.size()];
		for (int i = 0; i < F.length; i++) {
			F[i] = f.get(i);
		}
	}

	static int curTest;

	static void printTest(long n) {
		System.err.println("[" + ++curTest + "]");
		try {
			PrintWriter out = new PrintWriter(curTest / 10 + "" + curTest % 10);
			out.println(n);
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			exit(13);
		}
	}

	public static void main(String[] args) {
		curTest = 0;
		printTest(1);
		printTest(MAXN);
		printTest(MAXN - 1);
		printTest(F[F.length - 1]);
		printTest(2);
		for (int i = 0; i < 4; i++) {
			printTest(random(19));
		}
		printTest(getFib(1000000));
		printTest(getFib(100000));
		printTest(getPrime(19));
		printTest(getPrime(18));
		for (int i = 0; i < 10; i++) {
			printTest(random(59));
		}
		printTest(getFib(MAXN / 100));
		printTest(getPrime(50));
	}

	static long getPrime(int bits) {
		return probablePrime(bits, rand).longValue();
	}

	static long getFib(long n) {
		int i = F.length - 1;
		while (F[i] > n) {
			--i;
		}
		return F[i];
	}

	static long random(int bits) {
		long ret = 0;
		for (int i = 0; i < bits; i++) {
			if (rand.nextBoolean()) {
				ret |= 1L << i;
			}
		}
		return ret;
	}
}
