N=int(input()) A=[i+1 for i in range(N)] ans=[] for M in range(N)[::-1]: if len(A[:M]+ans)==2 and len(ans)==0: print("!", str(len(A[:M]+ans))) print(*A[:M]+ans) exit() print("?", str(len(A[:M]+ans))) print(*A[:M]+ans) judge=int(input()) if judge==0: ans=[A[-1]]+ans A.pop(-1) print("!", str(len(ans))) print(*ans)