#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
struct nomekop {
ll pos, delta_attack, companion;
};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
ll n;
cin >> n;
vector<ll> a(n);
for (ll& x : a)
cin >> x;
cout << "?";
for (int i = 0; i < n; i++)
cout << " " << a[i];
cout << endl;
ll baseline;
cin >> baseline;
vector<nomekop> opponents(n);
for (int i = 1; i < n; i++) {
cout << "? " << a[i];
for (int j = 1; j < n; j++) {
cout << " ";
if (i == j)
cout << a[0];
else
cout << a[j];
}
cout << endl;
ll cur;
cin >> cur;
ll delta = cur - baseline;
opponents[i].pos = i;
opponents[i].delta_attack = delta / (a[0] - a[i]);
}
sort(opponents.begin(), opponents.end(), [&](nomekop const& a, nomekop const& b) {
return a.delta_attack < b.delta_attack;
});
sort(a.begin(), a.end());
for (int i = 0; i < n; i++)
opponents[i].companion = a[i];
sort(opponents.begin(), opponents.end(), [&](nomekop const& a, nomekop const& b) {
return a.pos < b.pos;
});
cout << "!";
for (nomekop const& x : opponents)
cout << " " << x.companion;
cout << endl;
}