#include <bits/stdc++.h>
using namespace std;
int d[1000], q[1000], l[1000], r[1000], p[1000];
vector<int> dd[1000];
int main() {
  int n;
  cin >> n;
  int i, j;
  fill(d, d + n, -1);
  d[0] = 0, dd[0].push_back(0);
  int x = 0, z;
  while ((1 << x) < n) x++;
  for (i = 1; i < n; i++) l[i] = 1, r[i] = (1 << x) - 1;
  for (; x >= 1; x--) {
    for (z = 0; z < 2; z++) {
      for (i = 0; i < n; i++) q[i] = 0;
      for (i = (z << x); i < n; i += (1 << (x + 1))) {
        for (j = 0; j < dd[i].size(); j++) q[dd[i][j]] = (1 << (x - 1));
      }
      string s, s2;
      cout << "?";
      for (i = 0; i < n; i++) cout << " " << q[i];
      cout << endl;
      cin >> s;
      cout << "?";
      for (i = 0; i < n; i++) {
        if (q[i] > 0) q[i]--;
        cout << " " << q[i];
      }
      cout << endl;
      cin >> s2;
      for (i = 0; i < n; i++) {
        if ((d[i] != -1) || (((l[i] >> x) & 1) != z)) continue;
        if (s[i] != s2[i])
          d[i] = (l[i] + r[i]) / 2, dd[d[i]].push_back(i);
        else if (s[i] == '1')
          r[i] = (l[i] + r[i]) / 2 - 1;
        else
          l[i] = (l[i] + r[i]) / 2 + 1;
      }
    }
  }
  for (z = 0; z < 3; z++) {
    vector<int> v;
    for (i = 0; i < n; i++) {
      if ((d[i] % 3) == z) v.push_back(i);
    }
    for (i = 0; (1 << i) < v.size(); i++) {
      for (j = 0; j < n; j++) q[j] = 0;
      for (j = 0; j < v.size(); j++) {
        if (j & (1 << i)) q[v[j]] = 1;
      }
      string s;
      cout << "?";
      for (j = 0; j < n; j++) cout << " " << q[j];
      cout << endl;
      cin >> s;
      for (j = 0; j < n; j++) {
        if (((d[j] % 3) == ((z + 1) % 3)) && (s[j] == '1')) p[j] |= (1 << i);
      }
    }
    for (i = 0; i < n; i++) {
      if ((i > 0) && ((d[i] % 3) == ((z + 1) % 3))) p[i] = v[p[i]];
    }
  }
  cout << "!" << endl;
  for (i = 1; i < n; i++) cout << p[i] + 1 << " " << i + 1 << endl;
  return 0;
}
