N = int(input()) M = 10**8 L, R = -M-1, M+1 m = 0 while R-L >= 3: l, r = (L+m)//2, (m+R+1)//2 print(1, l, 0) Al = int(input()) print(1, r, 0) Ar = int(input()) print(1, m, 0) Am = int(input()) if Al < Am: L, m, R = L, l, m elif Am > Ar: L, m, R = m, r, R else: L, m, R = l, m, r ansx = L+1 L, R = -M-1, M+1 m = 0 while R-L >= 3: l, r = (L+M)//2, (M+R+1)//2 print(1, 0, l) Al = int(input()) print(1, 0, r) Ar = int(input()) print(1, 0, m) Am = int(input()) if Al < Am: L, m, R = L, l, m elif Am > Ar: L, m, R = m, r, R else: L, m, R = l, m, r ansy = L+1 print(2, ansx, ansy)