import sys N=int(input()) X=[0]*(N+1) if N%2: C=(N+1)//2 print(1,C,flush=True) Y=N-1 else: C=N//2 print(2,C,flush=True) Y=N-2 while Y: T=int(input()) if T==0 or T==1: sys.exit() elif T==2: _=input() sys.exit() k,x=map(int,input().split()) if N%2: if x