import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;
import java.util.Scanner;

public class Stress {
	public static void main(String[] args) throws IOException {
		Random rand = new Random(132543543);
		int cnt = 0;
		while (true) {
			cnt++;
			if (cnt % 10 == 0) {
				System.out.println(cnt);
			}
			int n = 1 + rand.nextInt(100000);
			PrintWriter out = new PrintWriter("bigsum.in");
			out.println(n);
			out.close();
			new bigsum_aa().run();
			Scanner in1 = new Scanner(new File("bigsum.out"));
			long ans1 = in1.nextLong();
			in1.close();
			new bigsum_aa_slow().run();
			Scanner in2 = new Scanner(new File("bigsum.out"));
			long ans2 = in2.nextLong();
			in1.close();
			if (ans1 != ans2) {
				System.out.println(n + ": " + ans1 + " " + ans2);
				break;
			}
		}
	}
}
