N=int(input()) x,y=0,0 l1=-1e9 r1=1e9 while r1-l1>2: m1=(l1*2+r1)//3 m2=(l1+r1*2)//3 print(1,m1,0) r1=int(input()) print(1,m2,0) r2=int(input()) if m1>m2:l2=m1 else:r2=m2 mn1=1e18 for i in range(l1,r1+1): print(1,i,0) r=int(input()) if mn1>r: mn1=r x=i l2=-1e9 r2=1e9 while r2-l2>2: m1=(l2*2+r2)//3 m2=(l2+r2*2)//3 print(1,x,m1) r1=int(input()) print(1,x,m2) r2=int(input()) if m1>m2:l2=m1 else:r2=m2 mn2=1e18 for i in range(l1,r1+1): print(1,x,i) r=int(input()) if mn2>r: mn2=r y=i print(x,y)