#include<bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin>>n;
int i,j,l,x,o,a[n+5][n+5],y, k;
for (i=1; i<=n; i++){
for (j=1; j<=n; j++){
a[i][j]=0;
}
}
for (i=1; i<=n; i++){
a[1][i]=1;
cout<<"?"<<endl;
for (j=1; j<=n; j++){
for (l=1; l<=n; l++){
cout<<a[j][l]<<' ';
}
cout<<endl;
}
cin>>x;
bool ok = 1;
if (x!=n*i){
a[1][i]=0;
for (j=2; j<=n; j++){
a[j][i]=1;
cout << "?" << endl;
for (o=1; o<=n; o++){
for (l=1; l<=n; l++){
cout<<a[o][l]<<' ';
}
cout<<endl;
}
cin>>y;
if (y!=n*i){
a[j][i]=0;
} else {
ok = 0;
break;
}
}
if(ok) {
cout << "!" << endl;
for (k=1; k<=n; k++){
for (l=1; l<=n; l++){
if(l == i) cout<<1<<' ';
else cout << 0 << ' ';
}
cout<<endl;
return 0;
}
}
}
}
cout<<"!"<<endl;
for (i=1; i<=n; i++){
for (j=1; j<=n; j++){
cout<<a[i][j]<<' ';
}
cout<<endl;
}
return 0;
}