import sys def solve(): first_line = sys.stdin.readline() if not first_line: return N = int(first_line.strip()) P = [0] * (N - 1) for i in range(N - 1): print(f"? {i} {N - 1}", flush=True) resp = int(sys.stdin.readline().strip()) if resp == -1: sys.exit(0) P[i] = resp candidates = [] for c in range(1, 10): possible = True for i in range(N - 1): if P[i] % c != 0 or not (0 <= P[i] // c <= 9): possible = False break if possible: candidates.append(c) if not candidates: print("! -1", flush=True) return if len(candidates) == 1: c = candidates[0] ans = [str(c)] + [str(P[i] // c) for i in range(N - 2, -1, -1)] print(f"! {''.join(ans)}", flush=True) return u, v = -1, -1 for i in range(N - 1): for j in range(i + 1, N - 1): if P[i] > 0 and P[j] > 0: u, v = i, j break if u != -1: break if u != -1 and v != -1: print(f"? {u} {v}", flush=True) Q = int(sys.stdin.readline().strip()) if Q == -1: sys.exit(0) filtered = [c for c in candidates if (P[u] // c) * (P[v] // c) == Q] if len(filtered) == 1: c = filtered[0] ans = [str(c)] + [str(P[i] // c) for i in range(N - 2, -1, -1)] print(f"! {''.join(ans)}", flush=True) else: print("! -1", flush=True) else: print("! -1", flush=True) if __name__ == '__main__': solve()