#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={42,4,8,16,23,15};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];
	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{
			ll f=num[i];
			ll s=sec;
			m[f]=true;
			m[s]=true;
			For(i,0,6)
			{
				if(m[num[i]]==false)
				{
					ll te=cur1/num[i];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[i];
						m[num[i]]=true;
						break;
					}
					else if(te==s)
					{
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[i];
						m[num[i]]=true;
						break;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
					break;
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
					break;
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
				m[num[i]]=true;
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={4,42,15,23,8,16};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];
	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{
			ll f=num[i];
			ll s=sec;
			m[f]=true;
			m[s]=true;
			For(i,0,6)
			{
				if(m[num[i]]==false)
				{
					ll te=cur1/num[i];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[i];
						m[num[i]]=true;
					}
					else if(te==s)
					{
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[i];
						m[num[i]]=true;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	//4 8 23 15 16 42
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={42,4,8,16,23,15};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];

	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=-1;
		if(cur%num[i]==0)
		sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{

			ll f=num[i];
			ll s=sec;
			if(f==s)
				continue;

			For(k,0,6)
			{
				if(m[num[k]]==false)
				{

					ll te=-1;
					if(cur1%num[k]==0)
					te=cur1/num[k];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[k];
						m[f]=true;
						m[s]=true;
						m[num[k]]=true;
						break;
					}
					else if(te==s)
					{

						ans[0]=f;
						ans[1]=s;
						ans[2]=num[k];
						m[f]=true;
						m[s]=true;
						m[num[k]]=true;
						break;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
					break;
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
					break;
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
				m[num[i]]=true;
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	//4 8 23 15 16 42
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={42,4,8,16,23,15};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];

	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=-1;
		if(cur%num[i]==0)
		sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{

			ll f=num[i];
			ll s=sec;
			if(f==s)
				continue;
				        m[f]=true;
						m[s]=true;

			For(k,0,6)
			{
				if(m[num[k]]==false)
				{

					ll te=-1;
					if(cur1%num[k]==0)
					te=cur1/num[k];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[k];
						m[f]=true;
						m[s]=true;
						m[num[k]]=true;
						break;
					}
					else if(te==s)
					{

						ans[0]=f;
						ans[1]=s;
						ans[2]=num[k];
						m[f]=true;
						m[s]=true;
						m[num[k]]=true;
						break;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
					break;
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
					break;
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
				m[num[i]]=true;
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={42,4,8,16,23,15};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];
	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec;
		if(cur%num[i]==0)
		sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{

			ll f=num[i];
			ll s=sec;
			m[f]=true;
			m[s]=true;
			For(k,0,6)
			{
				if(m[num[k]]==false)
				{
					ll te=cur1/num[k];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[k];
						m[num[k]]=true;
						break;
					}
					else if(te==s)
					{
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[k];
						m[num[k]]=true;
						break;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
					break;
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
					break;
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
				m[num[i]]=true;
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	//4 16 15 23 42 8
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={42,4,8,16,23,15};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];

	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=-1;
		if(cur%num[i]==0)
		sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{

			ll f=num[i];
			ll s=sec;
			if(f==s)
				continue;
			m[f]=true;
			m[s]=true;
			For(k,0,6)
			{
				if(m[num[k]]==false)
				{
					ll te=cur1/num[k];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[k];
						m[num[k]]=true;
						break;
					}
					else if(te==s)
					{
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[k];
						m[num[k]]=true;
						break;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
					break;
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
					break;
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
				m[num[i]]=true;
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={4,8,15,16,23,42};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[j++];
	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{
			ll f=num[i];
			ll s=sec;
			m[f]=true;
			m[s]=true;
			cur=val[j++];
			For(i,0,6)
			{
				if(m[num[i]]==false)
				{
					ll te=cur/num[i];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[i];
						m[num[i]]=true;
					}
					else if(te==s)
					{
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[i];
					}
				}
			}
		}
	}
}
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={42,4,8,16,23,15};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];
	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{
			ll f=num[i];
			ll s=sec;
			m[f]=true;
			m[s]=true;
			For(k,0,6)
			{
				if(m[num[k]]==false)
				{
					ll te=cur1/num[k];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[k];
						m[num[k]]=true;
						break;
					}
					else if(te==s)
					{
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[k];
						m[num[k]]=true;
						break;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
					break;
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
					break;
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
				m[num[i]]=true;
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	//4 8 23 15 16 42
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={42,4,8,16,23,15};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[0],cur1=val[1];

	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=-1;
		if(cur%num[i]==0)
		sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{

			ll f=num[i];
			ll s=sec;
			if(f==s)
				continue;

			For(k,0,6)
			{
				if(m[num[k]]==false)
				{

					ll te=-1;
					if(cur1%num[k]==0)
					te=cur1/num[k];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[k];
						m[f]=true;
						m[s]=true;
						m[num[k]]=true;
						break;
					}
					else if(te==s)
					{
						cout<<te<<endl;
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[k];
						m[f]=true;
						m[s]=true;
						m[num[k]]=true;
						break;
					}
				}
			}
		}
	}
}
        j=2;
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
					break;
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
					break;
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
				m[num[i]]=true;
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long
#define vi vector<ll>
#define For(i,a,b) for(ll (i)=(a);(i)<(b);++(i))
#define Fore(i,a,b) for(ll (i)=(a);(i)<=(b);++(i))
#define rof(i,a,b) for(ll (i)=(a);(i)>=(b);--(i))
#define max_el(x) max_element(x.begin(),x.end())
#define min_el(x) min_element(x.begin(),x.end())
#define pll pair<ll,ll>
#define ull unsigned long long
#define ld long double
#define inf 1e18
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define pi 3.1415926535
#define show(a) cout<<endl<<#a<<" = "<<(a)<<endl;
#define showarr(ar,size) cout<<endl<<#ar<<" array follows ";for(ll i=0;i<size;i++) cout<<ar[i]<<" "; cout<<endl;
#define mod 1000000007
//---------------------------------------------------------------------------------------------------------------------//

ll i,j,n,t;

int main()
{
	//ifstream cin("mytemp.txt");
	fastread;
	map<ll,bool> m,ava;
	ll val[4];
	j=0;
	vi ans(6);
	ll num[]={4,42,15,23,16,8};
     ava[4]={true};
     ava[8]={true};
     ava[15]={true};
     ava[16]={true};
     ava[23]={true};
     ava[42]={true};
	cout<<'?'<<" "<<1<<" "<<2<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<2<<" "<<3<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<3<<" "<<4<<endl;
	fflush(stdout);
	cin>>val[j++];
	cout<<'?'<<" "<<4<<" "<<5<<endl;
	fflush(stdout);
	cin>>val[j++];
	j=0;
	ll cur=val[j++];
	For(i,0,6)
	{
		if(m[num[i]]==false)
		{
		ll sec=cur/num[i];
		if(m[sec]==false&&ava[sec])
		{
			ll f=num[i];
			ll s=sec;
			m[f]=true;
			m[s]=true;
			cur=val[j++];
			For(i,0,6)
			{
				if(m[num[i]]==false)
				{
					ll te=cur/num[i];
					if(te==f)
					{
						ans[0]=s;
						ans[1]=f;
						ans[2]=num[i];
						m[num[i]]=true;
					}
					else if(te==s)
					{
						ans[0]=f;
						ans[1]=s;
						ans[2]=num[i];
						m[num[i]]=true;
					}
				}
			}
		}
	}
}
		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[2])
				{
					m[num[i]]=true;
					ans[3]=num[i];
				}
			}
		}

		cur=val[j++];
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				if(cur/num[i]==ans[3])
				{
					m[num[i]]=true;
					ans[4]=num[i];
				}
			}
		}
		For(i,0,6)
		{
			if(m[num[i]]==false)
			{
				ans[5]=num[i];
			}
		}
		cout<<"! ";
		For(i,0,6)
		cout<<ans[i]<<" ";
        cout<<endl;
        fflush(stdout);
	return 0;
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpll vector<pll>
#define vpii vector<pii>
#define umap unordered_map
#define uset unordered_set
#define PQ priority_queue

#define printa(a,L,R) for(int i=L;i<R;i++) cout<<a[i]<<(i==R-1?'\n':' ')
#define printv(a) printa(a,0,a.size())
#define print2d(a,r,c) for(int i=0;i<r;i++) for(int j=0;j<c;j++) cout<<a[i][j]<<(j==c-1?'\n':' ')
#define pb push_back
#define eb emplace_back
#define mt make_tuple
#define fbo find_by_order
#define ook order_of_key
#define MP make_pair
#define UB upper_bound
#define LB lower_bound
#define SQ(x) ((x)*(x))
#define issq(x) (((ll)(sqrt((x))))*((ll)(sqrt((x))))==(x))
#define F first
#define S second
#define mem(a,x) memset(a,x,sizeof(a))
#define inf 1e18
#define E 2.71828182845904523536
#define gamma 0.5772156649
#define nl "\n"
#define lg(r,n) (int)(log2(n)/log2(r))
#define pf printf
#define sf scanf
#define sf1(a)                scanf("%d",&a)
#define sf2(a,b)              scanf("%d %d",&a,&b)
#define sf3(a,b,c)            scanf("%d %d %d",&a,&b,&c)
#define pf1(a)                printf("%d\n",a);
#define pf2(a,b)              printf("%d %d\n",a,b)
#define pf3(a,b,c)            printf("%d %d %d\n",a,b,c)
#define sf1ll(a)              scanf("%lld",&a)
#define sf2ll(a,b)            scanf("%I64d %I64d",&a,&b)
#define sf3ll(a,b,c)          scanf("%I64d %I64d %I64d",&a,&b,&c)
#define pf1ll(a)              printf("%lld\n",a);
#define pf2ll(a,b)            printf("%I64d %I64d\n",a,b)
#define pf3ll(a,b,c)          printf("%I64d %I64d %I64d\n",a,b,c)
#define _ccase printf("Case %lld: ",++cs)
#define _case cout<<"Case "<<++cs<<": "
#define by(x) [](const auto& a, const auto& b) { return a.x < b.x; }

#define asche cerr<<"Ekhane asche\n";
#define rev(v) reverse(v.begin(),v.end())
#define srt(v) sort(v.begin(),v.end())
#define grtsrt(v) sort(v.begin(),v.end(),greater<ll>())
#define all(v) v.begin(),v.end()
#define mnv(v) *min_element(v.begin(),v.end())
#define mxv(v) *max_element(v.begin(),v.end())
#define toint(a) atoi(a.c_str())
#define fast ios_base::sync_with_stdio(false)
#define valid(tx,ty) (tx>=0&&tx<n&&ty>=0&&ty<m)
#define one(x) __builtin_popcount(x)
#define Unique(v) v.erase(unique(all(v)),v.end())
#define stree ll l=(n<<1),r=l+1,mid=b+(e-b)/2
#define fout(x) fixed<<setprecision(x)
string tostr(int n) {stringstream rr;rr<<n;return rr.str();}
inline void yes(){cout<<"YES\n";exit(0);}
inline void no(){cout<<"NO\n";exit(0);}
template <typename T> using o_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
ll dx[]={1,0,-1,0,1,-1,-1,1};
ll dy[]={0,1,0,-1,1,1,-1,-1};

#define debug(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); deb(_it, args); }
void deb(istream_iterator<string> it) {}
template<typename T, typename... Args>
void deb(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    deb(++it, args...);
}

const int mod=1e9+7;
const int N=2020;
const ld eps=1e-9;
const ld PI=acos(-1.0);
//ll gcd(ll a,ll b){while(b){ll x=a%b;a=b;b=x;}return a;}
//ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
//ll qpow(ll n,ll k) {ll ans=1;assert(k>=0);n%=mod;while(k>0){if(k&1) ans=(ans*n)%mod;n=(n*n)%mod;k>>=1;}return ans%mod;}
string s[N];
int ml[N][N],mr[N][N];
int main()
{
    	int j = 1 ;
        for(int i = 2 ; i <= 5 ; ++i){
        	printf("? %d %d\n",j, i);
        	fflush(stdout) ;
        	int x ;
        	scanf("%d",&x) ;
        }
        vi res(6) ;
        printf("! %d %d %d %d %d %d\n",res[0], res[1], res[2], res[3], res[4], res[5]);
        fflush(stdout) ;
    return 0 ;
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = II;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = II;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = II;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = II;
    /*for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    } */
    printf("? %d %d %d %d %d %d\n", ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = II;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = II;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = II;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = II;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = a[i];
                  ll two = a[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ans[1], ans[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = a[i];
                  ll two = a[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ans[4], ans[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    printf("! %d %d %d %d %d %d\n",ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    cout << "? " << 1 << ' ' << 2 << endl;
    cin >> a1;
    cout << "? " << 2 << ' ' << 3 << endl;
    cin >> a2;
    cout << "? " << 4 << ' ' << 5 << endl;
    cin >> a3;
    cout << "? " << 5 << ' ' << 6 << endl;
    cin >> a4;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    cout << "? " << ans[1] << ' ' << ans[2] << ' ' << ans[3] << ' ' << ans[4] << ' ' << ans[5] << ' ' << ans[6] << endl;
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = II;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = II;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = II;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = II;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    printf("! %d %d %d %d %d %d\n",ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    cin >> a1;
    printf("? 2 3\n");
    fflush(stdout);
    cin >> a2;
    printf("? 4 5\n");
    fflush(stdout);
    cin >> a3;
    printf("? 5 6\n");
    fflush(stdout);
    cin >> a4;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    printf("? %lld %lld %lld %lld %lld %lld\n", ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    cout << "? " << 1 << ' ' << 2 << endl;
    cin >> a1;
    cout << "? " << 2 << ' ' << 3 << endl;
    cin >> a2;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    cout << "? " << 4 << ' ' << 5 << endl;
    cin >> a3;
    cout << "? " << 5 << ' ' << 6 << endl;
    cin >> a4;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    cout << "? " << ' ' << ans[1] << ' ' << ans[2] << ' ' << ans[3] << ' ' << ans[4] << ' ' << ans[5] << ' ' << ans[6] << endl;
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = II;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = II;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = II;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = II;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = a[i];
                  ll two = a[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ans[1], ans[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = a[i];
                  ll two = a[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ans[4], ans[5]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    printf("! %d %d %d %d %d %d\n",ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
int main(){
    ll a1, a2, a3, a4, a5, a6;
    cout << "? " << 1 << ' ' << 2 << endl;
    cin >> a1;
    cout << "? " << 3 << ' ' << 4 << endl;
    cin >> a2;
    cout << "? " << 5 << ' ' << 6 << endl;
    cin >> a3;
    bool f = false;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[0] = a[i];
                    ans[1] = a[j];
                }
        }
    }
     for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a2==a[i]*a[j]){
                    ans[2] = a[i];
                    ans[3] = a[j];
                }
        }
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    cout << "? " << ans[0] << ' ' << ans[1] << ' ' << ans[2] << ' ' << ans[3] << ' ' << ans[4] << ' ' << ans[5] << endl;
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
int main(){
    ll a1, a2, a3, a4, a5, a6;
    cout << "? " << 1 << ' ' << 2 << endl;
    cin >> a1;
    cout << "? " << 3 << ' ' << 4 << endl;
    cin >> a2;
    cout << "? " << 5 << ' ' << 6 << endl;
    cin >> a3;
    cout << "? " << 5 << ' ' << 6 << endl;
    cin >> a3;
    bool f = false;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[0] = a[i];
                    ans[1] = a[j];
                }
        }
    }
     for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a2==a[i]*a[j]){
                    ans[2] = a[i];
                    ans[3] = a[j];
                }
        }
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    cout << "? " << ans[0] << ' ' << ans[1] << ' ' << ans[2] << ' ' << ans[3] << ' ' << ans[4] << ' ' << ans[5] << endl;
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = LL;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = LL;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = LL;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = LL;
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    printf("? %lld %lld %lld %lld %lld %lld\n", ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll res[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = II;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = II;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = II;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = II;
    /*for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    } */
    printf("! %d %d %d %d %d %d\n",res[0], res[1], res[2], res[3], res[4], res[5]);
    fflush(stdout);
    return 0;
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = LL;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = LL;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = LL;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = LL;
    /*for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    } */
    printf("? %lld %lld %lld %lld %lld %lld\n", ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = II;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = II;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = II;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = II;
    /*for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    } */
    printf("! %d %d %d %d %d %d\n",ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
    return 0;
}


// A smooth sea never made a skilled sailor.
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
#define sc(x)           scanf("%lld",&x)
#define scw(x)          scanf("%I64d",&x)
#define sci(x)          scanf("%d",&x)
#define sc2(x,y)        scanf("%lld %lld",&x,&y)
#define sc3(x,y,z)      scanf("%lld %lld %lld",&x,&y,&z)
#define Found(a, b)     a.find(b) != a.end()
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll N = 200005;
const ll MOD = 1e9 + 7;
ll a[] = {4, 8, 15, 16, 23, 42};
ll ans[N];
ll ara[N];
int main(){
    ll a1, a2, a3, a4;
    printf("? 1 2\n");
    fflush(stdout);
    a1 = II;
    printf("? 2 3\n");
    fflush(stdout);
    a2 = II;
    printf("? 4 5\n");
    fflush(stdout);
    a3 = II;
    printf("? 5 6\n");
    fflush(stdout);
    a4 = II;
    /*for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a1==a[i]*a[j]){
                    ans[1] = a[i];
                    ans[2] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a2==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[2]){
                      ans[3] = two;
                  }
                  else if(two==ans[2]){
                     ans[3] = one;
                  }
                  else{
                       swap(ara[1], ara[2]);
                        if(one==ans[2]){
                          ans[3] = two;
                        }
                        else if(two==ans[2]){
                           ans[3] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    }
    for(ll i =0 ; i<6; ++i){
            for(ll j = i+1 ; j<6; ++j){
                if(a3==a[i]*a[j]){
                    ans[4] = a[i];
                    ans[5] = a[j];
                }
        }
    }
    for(ll i = 0 ; i<6; ++i){
        bool f = false;
        for(ll j = i+1; j<6; ++j){
            if( a4==a[i]*a[j] ){
                  f = true;
                  ll one = ara[i];
                  ll two = ara[j];
                  if(one==ans[5]){
                      ans[6] = two;
                  }
                  else if(two==ans[5]){
                     ans[6] = one;
                  }
                  else{
                       swap(ara[4], ara[6]);
                        if(one==ans[5]){
                          ans[6] = two;
                        }
                        else if(two==ans[5]){
                           ans[6] = one;
                        }
                   } break;
              }
        }
        if(f) break;
    } */
    printf("! %d %d %d %d %d %d\n",ans[1], ans[2], ans[3], ans[4], ans[5], ans[6]);
    fflush(stdout);
    //return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	set <int> A;
	for(int i = 1; i <= 6; i++) {
		A.insert(ar[i]);
	}
	int x, y, a, b;
	cout << "? 2 1" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 2 3" << endl;
	fflush(stdout);
	cin >> y;
	cout << "? 5 4" << endl;
	fflush(stdout);
	cin >> a;
	cout << "? 5 6" << endl;
	fflush(stdout);
	cin >> b;
	for(int i = 1; i <= 6; i++) {
		for(int j = 1; j <= 6; j++) {
			if(i == j) {
				continue;
			}
			ans[2] = ar[i];
			ans[1] = x / ar[i]; if(ans[1] * ar[i] != x) continue;
			ans[3] = y / ar[i];
			if(ans[3] * ar[i] != y) continue;
			ans[5] = ar[j];
			ans[4] = a / ar[j];
			if(ans[4] * ar[j] != x) continue;
			ans[6] = b / ar[j];
			if(ans[6] * ar[j] != y) continue;
			set <int> B;
			for(int l = 1; l <= 6; l++) {
				B.insert(ans[l]);
			}
			if(A == B) {
				printf("!");
				fflush(stdout);
				for(int i = 1; i <= 6; i++) {
					printf(" %d", ans[i]);
					fflush(stdout);
				}
				printf("\n");
				fflush(stdout);
				return 0;
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	for(int i = 1; i <= 6; i++) {
		mp[ar[i]] = 1;
	}
	int x, y;
	cout << "? 1 2" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 1 3" << endl;
	fflush(stdout);
	cin >> y;
	for(int i = 1; i <= 6; i++) {
		int a = ar[i];
		int b = x / a;
		int c = y / a;
		if(mp[b] && mp[c] && a * b == x && a * c == y) {
			ans[1] = a;
			ans[2] = b;
			ans[3] = c;
			mp[a] = 0;
			mp[b] = 0;
			mp[c] = 0;
		}
	}
	cout << "? 4 5" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 4 6" << endl;
	fflush(stdout);
	cin >> y;
	for(int i = 1; i <= 6; i++) {
		int a = ar[i];
		int b = x / a;
		int c = y / a;
		if(mp[a] && a * b == x && a * c == y) {
			mp[a] = 0;
			if(mp[b] && mp[c]) {
				ans[4] = a;
				ans[5] = b;
				ans[6] = c;
				mp[a] = 0;
				mp[b] = 0;
				mp[c] = 0;
				break;
			}
			mp[a] = 1;
		}
	}
	printf("!");
	for(int i = 1; i <= 6; i++) {
		printf(" %d", ans[i]);
	}
	printf("\n");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	for(int i = 1; i <= 6; i++) {
		mp[ar[i]] = 1;
	}
	int x, y;
	cout << "? 1 2" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 1 3" << endl;
	fflush(stdout);
	cin >> y;
	for(int i = 1; i <= 6; i++) {
		int a = ar[i];
		int b = x / a;
		int c = y / a;
		if(mp[b] && mp[c] && a != b && b != c) {
			ans[1] = a;
			ans[2] = b;
			ans[3] = c;
			mp[a] = 0;
			mp[b] = 0;
			mp[c] = 0;
		}
	}
	cout << "? 4 5" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 4 6" << endl;
	fflush(stdout);
	cin >> y;
	for(int i = 1; i <= 6; i++) {
		int a = ar[i];
		int b = x / a;
		int c = y / a;
		if(mp[a]) {
			mp[a] = 0;
			if(mp[b] && mp[c] && a != b && b != c) {
				ans[4] = a;
				ans[5] = b;
				ans[6] = c;
				mp[a] = 0;
				mp[b] = 0;
				mp[c] = 0;
				break;
			}
			mp[a] = 1;
		}
	}
	printf("!");
	for(int i = 1; i <= 6; i++) {
		printf(" %d", ans[i]);
	}
	printf("\n");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	set <int> A;
	for(int i = 1; i <= 6; i++) {
		A.insert(ar[i]);
	}
	int x, y, a, b;
	cout << "? 1 2" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 1 3" << endl;
	fflush(stdout);
	cin >> y;
	cout << "? 4 5" << endl;
	fflush(stdout);
	cin >> a;
	cout << "? 4 6" << endl;
	fflush(stdout);
	cin >> b;
	for(int i = 1; i <= 6; i++) {
		for(int j = 1; j <= 6; j++) {
			if(i == j) {
				continue;
			}
			ans[1] = ar[i];
			ans[2] = x / ar[i];
			ans[3] = y / ar[i];
			ans[4] = ar[j];
			ans[5] = a / ar[j];
			ans[6] = b / ar[j];
			set <int> B;
			for(int l = 1; l <= 6; l++) {
				B.insert(ans[l]);
			}
			if(A == B) {
				printf("!");
				fflush(stdout);
				for(int i = 1; i <= 6; i++) {
					printf(" %d", ans[i]);
					fflush(stdout);
				}
				printf("\n");
				fflush(stdout);
				return 0;
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	set <int> A;
	for(int i = 1; i <= 6; i++) {
		A.insert(ar[i]);
	}
	int x, y, a, b;
	cout << "? 2 1" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 2 3" << endl;
	fflush(stdout);
	cin >> y;
	cout << "? 5 4" << endl;
	fflush(stdout);
	cin >> a;
	cout << "? 5 6" << endl;
	fflush(stdout);
	cin >> b;
	for(int i = 1; i <= 6; i++) {
		for(int j = 1; j <= 6; j++) {
			if(i == j) {
				continue;
			}
			ans[2] = ar[i];
			ans[1] = x / ar[i];
			ans[3] = y / ar[i];
			ans[5] = ar[j];
			ans[4] = a / ar[j];
			ans[6] = b / ar[j];
			set <int> B;
			for(int l = 1; l <= 6; l++) {
				B.insert(ans[l]);
			}
			if(A == B) {
				printf("!");
				fflush(stdout);
				for(int i = 1; i <= 6; i++) {
					printf(" %d", ans[i]);
					fflush(stdout);
				}
				printf("\n");
				fflush(stdout);
				return 0;
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	set <int> A;
	for(int i = 1; i <= 6; i++) {
		A.insert(ar[i]);
	}
	int x, y, a, b;
	cout << "? 1 2" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 1 3" << endl;
	fflush(stdout);
	cin >> y;
	cout << "? 4 5" << endl;
	fflush(stdout);
	cin >> a;
	cout << "? 4 6" << endl;
	fflush(stdout);
	cin >> b;
	for(int i = 1; i <= 6; i++) {
		for(int j = 1; j <= 6; j++) {
			if(i == j) {
				continue;
			}
			ans[1] = ar[i];
			ans[2] = x / ar[i];
			ans[3] = y / ar[i];
			ans[4] = ar[j];
			ans[5] = a / ar[j];
			ans[6] = b / ar[j];
			set <int> B;
			for(int l = 1; l <= 6; l++) {
				B.insert(ans[l]);
			}
			if(A == B) {
				printf("!");
				for(int i = 1; i <= 6; i++) {
					printf(" %d", ans[i]);
				}
				printf("\n");
				return 0;
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	for(int i = 1; i <= 6; i++) {
		mp[ar[i]] = 1;
	}
	int x, y;
	cout << "? 1 2" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 1 3" << endl;
	fflush(stdout);
	cin >> y;
	for(int i = 1; i <= 6; i++) {
		int a = ar[i];
		int b = x / a;
		int c = y / a;
		if(mp[b] && mp[c]) {
			ans[1] = a;
			ans[2] = b;
			ans[3] = c;
			mp[a] = 0;
			mp[b] = 0;
			mp[c] = 0;
		}
	}
	cout << "? 4 5" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 4 6" << endl;
	fflush(stdout);
	cin >> y;
	for(int i = 1; i <= 6; i++) {
		int a = ar[i];
		int b = x / a;
		int c = y / a;
		if(mp[a]) {
			mp[a] = 0;
			if(mp[b] && mp[c]) {
				ans[4] = a;
				ans[5] = b;
				ans[6] = c;
				mp[a] = 0;
				mp[b] = 0;
				mp[c] = 0;
				break;
			}
			mp[a] = 1;
		}
	}
	printf("!");
	for(int i = 1; i <= 6; i++) {
		printf(" %d", ans[i]);
	}
	printf("\n");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <ll, ll> pll;

const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const ll Inf = 1LL << 62;

int ar[7] = {0, 4, 8, 15, 16, 23, 42};
int mp[Max];
int ans[Max];

int main() {
#ifdef Mr_Emrul
	freopen("inputf.in", "r", stdin);
#endif /// Mr_Emrul

	set <int> A;
	for(int i = 1; i <= 6; i++) {
		A.insert(ar[i]);
	}
	int x, y, a, b;
	cout << "? 1 2" << endl;
	fflush(stdout);
	cin >> x;
	cout << "? 1 3" << endl;
	fflush(stdout);
	cin >> y;
	cout << "? 4 5" << endl;
	fflush(stdout);
	cin >> a;
	cout << "? 4 6" << endl;
	fflush(stdout);
	cin >> b;
	for(int i = 1; i <= 6; i++) {
		for(int j = i + 1; j <= 6; j++) {
			ans[1] = ar[i];
			ans[2] = x / ar[i];
			ans[3] = y / ar[i];
			ans[4] = ar[j];
			ans[5] = a / ar[j];
			ans[6] = b / ar[j];
			set <int> B;
			for(int l = 1; l <= 6; l++) {
				B.insert(ans[l]);
			}
			if(A == B) {
				printf("!");
				for(int i = 1; i <= 6; i++) {
					printf(" %d", ans[i]);
				}
				printf("\n");
				return 0;
			}
		}
	}
	return 0;
}