#include using namespace std; template istream &operator>>(istream &is, vector &v) { for (T &in : v) is >> in; return is; } template ostream &operator<<(ostream &os, const vector &v) { for (int i = 0; i < (int)v.size(); i++) os << v[i] << (i + 1 != (int)v.size() ? " " : ""); return os; } #define OVERLOAD_REP(_1, _2, _3, name, ...) name #define REP1(i, n) for (auto i = std::decay_t{}; (i) != (n); ++(i)) #define REP2(i, l, r) for (auto i = (l); (i) != (r); ++(i)) #define rep(...) OVERLOAD_REP(__VA_ARGS__, REP2, REP1)(__VA_ARGS__) #define sum(l) accumulate(l.begin(), l.end(), 0) #define all(...) std::begin(__VA_ARGS__), std::end(__VA_ARGS__) #define rall(...) std::rbegin(__VA_ARGS__), std::rend(__VA_ARGS__) using ull = unsigned long long; using ll = long long; using vi = vector; using vl = vector; using vll = vector; using vvi = vector; using vvl = vector; using vvll = vector; using vs = vector; using pii = pair; using vpii = vector; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; int nm1 = N - 1; vi p(N - 1); rep(i, N - 1) { cout << "? " << i << " " << nm1 << '\n'; cout.flush(); cin >> p[i]; if (p[i] == -1) return 0; } vi nz; rep(i, N - 1) if (p[i]) nz.push_back(i); vi d(N, 0); if (nz.size() == 0) { cout << "! -1\n"; cout.flush(); return 0; } if (nz.size() == 1) { int i = nz[0]; int prod = p[i]; pii cand = {-1, -1}; rep(a, 1, 10) rep(b, 1, 10) { if (a * b != prod) continue; if (cand.first != -1) { cout << "! -1\n"; cout.flush(); return 0; } cand = {a, b}; } if (cand.first == -1) { cout << "! -1\n"; cout.flush(); return 0; } d[nm1] = cand.first; d[i] = cand.second; } else { int a = nz[0], b = nz[1]; cout << "? " << a << " " << b << '\n'; cout.flush(); int q; cin >> q; if (q == -1) return 0; int keta = sqrt(1LL * p[a] * p[b] / q); d[nm1] = keta; rep(i, N - 1) if (p[i]) d[i] = p[i] / keta; } string ans; for (int i = N - 1; i >= 0; --i) ans += char('0' + d[i]); cout << "! " << ans << '\n'; cout.flush(); return 0; }