For USACO 2015 US Open, Gold Googol, i tried submitting the naive \mathcal{O}(N) solution from the editorial (which is supposed to TLE because N is bounded by 10^{100}):
import sys
def ask(cur):
print cur
sys.stdout.flush()
return [int(_) for _ in raw_input().split()]
def count(cur): # count size of subtree at cur
if cur == 0:
return 0
a, b = ask(cur)
rgt = count(b)
lft = count(a)
return 1 + lft + rgt
ans = count(1)
print 'Answer %d' % ans
but it seems to AC all the test cases for some reason.