#include <bits/stdc++.h>
using namespace std;
int n;
int ask(vector<pair<int, int>> v){
cout << "?" << endl;
vector<vector<int>> mat(n, vector<int> (n, 0));
for(auto [x, y] : v) mat[x][y] = 1;
for(int i=0; i<n; i++){
for(int j=0; j<n; j++){
cout << mat[i][j];
}
cout << endl;
}
int ans; cin >> ans;
return ans;
}
void answer(vector<pair<int, int>> v){
cout << "!" << endl;
vector<vector<int>> mat(n, vector<int> (n, 0));
for(auto [x, y] : v) mat[x][y] = 1;
for(int i=0; i<n; i++){
for(int j=0; j<n; j++){
cout << mat[i][j];
}
cout << endl;
}
}
vector<pair<int, int>> col(int j, int i){
vector<pair<int, int>> ret;
for(int k=0; k<=i; k++) ret.push_back({k, j});
return ret;
}
int main(){
cin.tie(0)->sync_with_stdio(0);
cin >> n;
vector<pair<int, int>> ans;
for(int i=0; i<n; i++){
if(ask(col(i, n - 1)) == n * n){
answer(col(i, n - 1));
return 0;
}
int x = ask(col(i, 1));
if(x != 2 * n){
if(x == n){
ans.push_back({0, i});
continue;
}
// entao x = 2n - 1
if(ask(col(i, 2)) == x){
ans.push_back({2, i});
continue;
}
if(ask({{0, i}, {2, i}}) != 2 * n){
ans.push_back({0, i});
} else ans.push_back({1, i});
continue;
}
// entao sei que 0 e 1 sao horizontais
int l = 2, r = n - 1;
while(l < r){
int m = l + (r - l) / 2;
if(ask(col(i, m)) != (m + 1) * n) r = m;
else l = m + 1;
}
ans.push_back({r, i});
}
answer(ans);
return 0;
}