S = set(range(int(input()))) while len(S)>1: X, Y = S.pop(),S.pop() print("?", X, Y) Z = int(input()) if X == Z: print("!", Y); exit(0) if Y == Z: print("!", X); exit(0) print("!", S.pop())