N=int(input()) l=-10**8 r=10**8 while True: m1=(2*l+r)//3 m2=(l+2*r)//3 print(1,m1,0,flush=True) d1=int(input()) print(1,m2,0,flush=True) d2=int(input()) if d1<=d2: r=m2 else: l=m1 if abs(r-l)==0: break if abs(r-l)<=2: w=10**19 pos=-1 for y in range(l,r+1): print(1,y,0,flush=True) d1=int(input()) if d1