#include<bits/stdc++.h>
#define rep(i,j,k) for(int i=j;i<=k;i++)
#define repp(i,j,k) for(int i=j;i>=k;i--)
#define ls(x) (x<<1)
#define rs(x) ((x<<1)|1)
#define mp make_pair
#define sec second
#define fir first
#define pii pair<int,int>
#define lowbit(i) i&-i
#define int long long
#define qingbai qwq
using namespace std;
typedef long long ll;
const int N=1e4+5,M=55,S=(1<<18)+5,inf=(ll)1e18+7,mo=998244353;
const double eps=1e-8;
void read(int &p){
int x=0,w=1;
char ch=0;
while(!isdigit(ch)){
if(ch=='-')w=-inf;
ch=getchar();
}
while(isdigit(ch)){
x=(x<<1)+(x<<3)+ch-'0';
ch=getchar();
}
p=x*w;
}
int n,tms=50;
unordered_map<int,int>id;
int rev[N];
int fid[N],fdr[N],st[M][N],fa[N];
int qr[M][N],sz[M][N],tot;
pii ans[N];
bool vis[N];
bool check(int x){//check if x is leaves now or not;if is,get its fid and fdr.
int nwv=0;
rep(i,1,tms)
if(qr[i][x]sz[i][x])nwv|=1ll<<(i-1);
if(!id[nwv]&&!id[tot^nwv])return 0;
if(id[nwv])fid[x]=id[nwv],fdr[x]=1;
else fid[x]=id[tot^nwv],fdr[x]=0;
return 1;
}
signed main(){
read(n);
tot=(1ll<<tms)-1;
rep(i,1,n-1){
rep(j,1,tms)
rev[j]=(j>tms/2);
while(1){
random_shuffle(rev+1,rev+tms+1);
int nwv=0;
rep(j,1,tms)
nwv|=rev[j]<<(j-1);
if(!id[nwv]&&!id[tot^nwv]){
id[nwv]=i;
rep(j,1,tms)
st[j][i]=rev[j];
break;
}
}
}
rep(i,1,tms){
printf("? ");
rep(j,1,n-1)
printf("%lld",st[i][j]);
puts(""),fflush(stdout);
rep(j,1,n)
read(qr[i][j]);
}
queue<int>q;
rep(i,1,n){
rep(j,1,tms)
sz[j][i]=1;
}
rep(i,1,n)
if(check(i))q.push(i),vis[i]=1;
while(!q.empty()){
int x=q.front();
q.pop();
//find father
rep(i,1,n){
if(fa[i]||ix)continue;
bool ok=1;
rep(j,1,tms){
if(!(fdr[x]^st[j][fid[x]]))continue;
if(qr[j][i]+sz[j][x]!=qr[j][x]){
ok=0;
break;
}
}
if(ok){
fa[x]=i;
break;
}
}
//deal with father details
if(!fa[x])continue;
rep(i,1,tms)
if(!(fdr[x]^st[i][fid[x]]))sz[i][fa[x]]+=sz[i][x];
if(check(fa[x]))q.push(fa[x]),vis[fa[x]]=1;
}
rep(i,1,n){
if(!fa[i])continue;
if(fdr[i])ans[fid[i]]=mp(fa[i],i);
else ans[fid[i]]=mp(i,fa[i]);
}
printf("! ");
rep(i,1,n-1)
printf("%lld %lld ",ans[i].fir,ans[i].sec);
puts("");
fflush(stdout);
return 0;
}
}