import std; void main () { int p = 10 ^^ 9; while (true) { writeln(p); stdout.flush; int r = readln.chomp.to!int; if (r == 1) break; p /= 2; } } void read (T...) (string S, ref T args) { import std.conv : to; import std.array : split; auto buf = S.split; foreach (i, ref arg; args) { arg = buf[i].to!(typeof(arg)); } }