#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
vector<pair<int, int>>vec; int n; bool used[210];
map<long long, int>M;
long long useds() {
long long ret = 0, I = 1;
for (int i = 0; i < n; i++) {
ret += I*used[i]; I *= 2;
I %= 1145141919810893; ret %= 1145141919810893;
}
return ret;
}
int solve() {
if (M[useds()] >= 1)return M[useds()] - 1;
cout << "? ";
for (int i = 0; i < n; i++) {
if (used[i] == true)putchar(49); else putchar(48);
}
cout << endl;
int r = 0; cin >> r;
M[useds()] = r + 1;
return r;
}
void Zen_Re_Kkyo(int a1, int a2, int a3, int a4) {
for (int i = a1; i < a2; i++) {
for (int j = a3; j < a4; j++) {
for (int k = 0; k < n; k++)used[k] = false; used[i] = true; used[j] = true;
if (solve() >= 1)vec.push_back(make_pair(i, j));
}
}
}
void solve_Range(int a1, int a2, int a3, int a4, int a5) {
if (a1 == a2 - 1 && a3 == a4 - 1) {
vec.push_back(make_pair(a1, a3)); return;
}
if ((a2 - a1) < (a4 - a3)) {
int Range = a4 - a3; Range /= 2;
for (int j = 0; j < n; j++)used[j] = false;
for (int j = a1; j < a2; j++)used[j] = true; for (int j = a3; j < a3 + Range; j++)used[j] = true;
int E = solve();
if (E >= 1)solve_Range(a1, a2, a3, a3 + Range, E);
if (a5 - E >= 1)solve_Range(a1, a2, a3 + Range, a4, a5 - E);
}
else {
int Range = a2 - a1; Range /= 2;
for (int j = 0; j < n; j++)used[j] = false;
for (int j = a1; j < a1 + Range; j++)used[j] = true; for (int j = a3; j < a4; j++)used[j] = true;
int E = solve();
if (E >= 1)solve_Range(a1, a1 + Range, a3, a4, E);
if (a5 - E >= 1) solve_Range(a1 + Range, a2, a3, a4, a5 - E);
}
}
void used_Range(int a1, int a2, int a3, int a4) {
for (int i = 0; i < n; i++)used[i] = false;
for (int i = a1; i < a2; i++)used[i] = true;
for (int i = a3; i < a4; i++)used[i] = true;
}
void solve8(int i, int j, int T, int U) {
if (T == 2) {
Zen_Re_Kkyo(i, i + T, j, j + T);
return;
}
if (T > U) {
int E1, E2, E3;
used_Range(i, i + T / 2, j, j + U); E1 = solve();
used_Range(i, i + T / 2, j, j); E2 = solve(); E1 -= E2;
used_Range(i, i, j, j + U); E3 = solve(); E1 -= E3;
if (E1 >= 1) {
if ((E1 >= 1 && E1 <= 3) && E2 == 0 && E3 == 0)solve_Range(i, i + T / 2, j, j + U, E1);
else solve8(i, j, T / 2, U);
}
used_Range(i + T / 2, i + T, j, j + U); E1 = solve();
used_Range(i + T / 2, i + T, j, j); E2 = solve(); E1 -= E2;
used_Range(i, i, j, j + U); E3 = solve(); E1 -= E3;
if (E1 >= 1) {
if ((E1 >= 1 && E1 <= 3) && E2 == 0 && E3 == 0)solve_Range(i + T / 2, i + T, j, j + U, E1);
else solve8(i + T / 2, j, T / 2, U);
}
}
else {
int E1, E2, E3;
used_Range(i, i + T, j, j + U / 2); E1 = solve();
used_Range(i, i + T, j, j); E2 = solve(); E1 -= E2;
used_Range(i, i, j, j + U / 2); E3 = solve(); E1 -= E3;
if (E1 >= 1) {
if ((E1 >= 1 && E1 <= 3) && E2 == 0 && E3 == 0)solve_Range(i, i + T, j, j + U / 2, E1);
else solve8(i, j, T, U / 2);
}
used_Range(i, i + T, j + U / 2, j + U); E1 = solve();
used_Range(i, i + T, j, j); E2 = solve(); E1 -= E2;
used_Range(i, i, j + U / 2, j + U); E3 = solve(); E1 -= E3;
if (E1 >= 1) {
if ((E1 >= 1 && E1 <= 3) && E2 == 0 && E3 == 0)solve_Range(i, i + T, j + U / 2, j + U, E1);
else solve8(i, j + U / 2, T, U / 2);
}
}
}
void search() {
int T = 8;
for (int i = 0; i < n; i += T) {
for (int j = 0; j < n; j++)used[j] = false; for (int j = i; j < i + T; j++)used[j] = true;
int p1 = solve();
if (p1 >= 1) {
used_Range(i, i + T / 2, 0, 0); int E1 = solve();
used_Range(i + T / 2, i + T, 0, 0); int E2 = solve();
if (p1 - E1 - E2 >= 1)solve8(i, i + T / 2, T / 2, T / 2);
if (E1 >= 1) {
for (int j = i; j < i + T / 2; j++) {
for (int k = j + 1; k < i + T / 2; k++) {
for (int l = 0; l < n; l++)used[l] = false; used[j] = true; used[k] = true;
if (solve() >= 1)vec.push_back(make_pair(j, k));
}
}
}
if (E2 >= 1) {
for (int j = i + T / 2; j < i + T; j++) {
for (int k = j + 1; k < i + T; k++) {
for (int l = 0; l < n; l++)used[l] = false; used[j] = true; used[k] = true;
if (solve() >= 1)vec.push_back(make_pair(j, k));
}
}
}
}
}
for (int i = 0; i < n; i += T) {
for (int j = i + T; j < n; j += T) {
for (int k = 0; k < n; k++)used[k] = false;
for (int k = i; k < i + T; k++)used[k] = true; for (int k = j; k < j + T; k++)used[k] = true;
int p2 = solve();
for (int k = 0; k < n; k++)used[k] = false; for (int k = i; k < i + T; k++)used[k] = true;
int p1 = solve(); p2 -= p1;
for (int k = 0; k < n; k++)used[k] = false; for (int k = j; k < j + T; k++)used[k] = true;
int p3 = solve(); p2 -= p3;
if ((p2 >= 1 && p2 <= 3) && p1 == 0 && p3 == 0) {
solve_Range(i, i + T, j, j + T, p2);
}
else if (p2 >= 1) {
solve8(i, j, T, T);
}
}
}
}
int main() {
cin >> n;
search();
sort(vec.begin(), vec.end());
cout << "! ";
for (int i = 0; i < vec.size(); i++) {
if (i)cout << ' ';
cout << "(" << vec[i].first << ',' << vec[i].second << ")";
}
cout << endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPHZlY3Rvcj4KI2luY2x1ZGU8bWFwPgojaW5jbHVkZTxhbGdvcml0aG0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnZlY3RvcjxwYWlyPGludCwgaW50Pj52ZWM7IGludCBuOyBib29sIHVzZWRbMjEwXTsKbWFwPGxvbmcgbG9uZywgaW50Pk07CmxvbmcgbG9uZyB1c2VkcygpIHsKCWxvbmcgbG9uZyByZXQgPSAwLCBJID0gMTsKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CgkJcmV0ICs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