#include <bits/stdc++.h>
using namespace std;
long long n;
const long long N = 1e3 + 10;
long long mod2[N], mod3[N], mod5[N], mod7[N], mod8[N], mod4[N];
long long pos[N], res;
long long ok[N];
bool vis[10], dis[10];
vector<long long> r;
long long cnt = 0;
vector<long long> av[100];
long long s[100];
long long a[100];
long long v[10000];
inline void dfs(long long n, long long m) {
  if (m == 6) {
    long long sum = 0;
    for (long long i = 1; i <= 6; i++) {
      sum += r[a[i] - 1];
    }
    if (vis[sum % 7]) return;
    if (cnt == 6) return;
    cnt++;
    for (long long i = 1; i <= 6; i++) av[cnt].push_back(r[a[i] - 1]);
    s[cnt] = sum % 7;
    vis[sum % 7] = 1;
    return;
  }
  if (n == 8 + 1) {
    return;
  }
  for (long long i = 1; i <= 8; i++) {
    if (dis[i]) continue;
    dis[i] = 1;
    a[n] = i;
    dfs(n + 1, m + 1);
    dis[i] = 0;
  }
}
long long lef = 0;
bool bn[100];
inline void exgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1, y = 0;
    return;
  }
  exgcd(b, a % b, y, x);
  y -= (a / b) * x;
}
inline void upd() {
  v[pos[1]] = 1;
  v[pos[2]] = 2;
  v[pos[3]] = 3;
  v[pos[4]] = 4;
  v[pos[n - 3]] = n - 3;
  v[pos[n - 2]] = n - 2;
  v[pos[n - 1]] = n - 1;
  v[pos[n]] = n;
}
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cout << "? " << n - 1 << " ";
    for (long long j = 1; j <= n; j++) {
      if (i == j) continue;
      cout << j << " ";
    }
    cout << endl;
    cin >> res;
    if (res == 1) {
      if (pos[1])
        pos[n] = i;
      else
        pos[1] = i;
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (i == pos[1]) continue;
    cout << "? 2 " << pos[1] << " " << i << endl;
    cin >> res;
    if (res == 1) {
      mod2[i] = 1;
    } else {
      mod2[i] = 0;
    }
  }
  if (n <= 2) {
    upd();
    if (v[1] > n / 2) {
      for (long long i = 1; i <= n; i++) {
        v[i] = n + 1 - v[i];
      }
    }
    cout << "! ";
    for (long long i = 1; i <= n; i++) cout << v[i] << " ";
    cout << endl;
    return 0;
  }
  ok[pos[1]] = ok[pos[n]] = 1;
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    cout << "? " << n - 3 << " ";
    for (long long j = 1; j <= n; j++) {
      if (j == i || ok[j]) continue;
      cout << j << " ";
    }
    cout << endl;
    cin >> res;
    if (res == 1) {
      if (mod2[i] == 1)
        pos[n - 1] = i;
      else
        pos[2] = i;
    }
  }
  if (n <= 4) {
    upd();
    if (v[1] > n / 2) {
      for (long long i = 1; i <= n; i++) {
        v[i] = n + 1 - v[i];
      }
    }
    cout << "! ";
    for (long long i = 1; i <= n; i++) cout << v[i] << " ";
    cout << endl;
    return 0;
  }
  ok[pos[2]] = ok[pos[n - 1]] = 1;
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    cout << "? " << n - 5 << " ";
    for (long long j = 1; j <= n; j++) {
      if (j == i || ok[j]) continue;
      cout << j << " ";
    }
    cout << endl;
    cin >> res;
    if (res == 1) {
      if (mod2[i] == 1)
        pos[3] = i;
      else
        pos[n - 2] = i;
    }
  }
  if (n <= 6) {
    upd();
    if (v[1] > n / 2) {
      for (long long i = 1; i <= n; i++) {
        v[i] = n + 1 - v[i];
      }
    }
    cout << "! ";
    for (long long i = 1; i <= n; i++) cout << v[i] << " ";
    cout << endl;
    return 0;
  }
  ok[pos[3]] = ok[pos[n - 2]] = 1;
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    cout << "? " << n - 7 << " ";
    for (long long j = 1; j <= n; j++) {
      if (j == i || ok[j]) continue;
      cout << j << " ";
    }
    cout << endl;
    cin >> res;
    if (res == 1) {
      if (mod2[i] == 1)
        pos[n - 3] = i;
      else
        pos[4] = i;
    }
  }
  ok[pos[4]] = ok[pos[n - 3]] = 1;
  if (n <= 8) {
    upd();
    if (v[1] > n / 2) {
      for (long long i = 1; i <= n; i++) {
        v[i] = n + 1 - v[i];
      }
    }
    cout << "! ";
    for (long long i = 1; i <= n; i++) cout << v[i] << " ";
    cout << endl;
    return 0;
  }
  r.push_back(1);
  r.push_back(2);
  r.push_back(3);
  r.push_back(4);
  r.push_back(n);
  r.push_back(n - 1);
  r.push_back(n - 2);
  r.push_back(n - 3);
  dfs(1, 0);
  for (long long i = 1; i <= cnt; i++) bn[s[i]] = 1;
  for (long long i = 0; i <= 6; i++)
    if (bn[i] == 0) lef = i;
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    cout << "? 3 " << pos[1] << " " << pos[2] << " " << i << endl;
    cin >> res;
    if (res == 1) {
      mod3[i] = 0;
      continue;
    }
    cout << "? 3 " << pos[1] << " " << pos[3] << " " << i << endl;
    cin >> res;
    if (res == 1) {
      mod3[i] = 2;
    } else
      mod3[i] = 1;
  }
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    cout << "? 5 " << pos[1] << " " << pos[2] << " " << pos[3] << " " << pos[n]
         << " " << i << endl;
    cin >> res;
    if (res == 1) {
      mod5[i] = (5 - ((6 + n) % 5)) % 5;
      continue;
    }
    cout << "? 5 " << pos[1] << " " << pos[2] << " " << pos[4] << " " << pos[n]
         << " " << i << endl;
    cin >> res;
    if (res == 1) {
      mod5[i] = (5 - ((7 + n) % 5)) % 5;
      continue;
    }
    cout << "? 5 " << pos[1] << " " << pos[3] << " " << pos[4] << " " << pos[n]
         << " " << i << endl;
    cin >> res;
    if (res == 1) {
      mod5[i] = (5 - ((8 + n) % 5)) % 5;
      continue;
    }
    cout << "? 5 " << pos[2] << " " << pos[3] << " " << pos[4] << " " << pos[n]
         << " " << i << endl;
    cin >> res;
    if (res == 1) {
      mod5[i] = (5 - ((9 + n) % 5)) % 5;
      continue;
    } else
      mod5[i] = (5 - ((n) % 5)) % 5;
  }
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    bool f = 0;
    for (long long j = 1; j <= cnt; j++) {
      cout << "? 7 ";
      for (auto x : av[j]) cout << pos[x] << " ";
      cout << i << endl;
      cin >> res;
      if (res == 1) {
        f = 1;
        mod7[i] = (7 - s[j]) % 7;
        break;
      }
    }
    if (f == 0) mod7[i] = (7 - lef) % 7;
  }
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    if (mod2[i] == 0) {
      cout << "? 4 " << pos[1] << " " << pos[3] << " " << pos[4] << " " << i
           << endl
           << flush;
      cin >> res;
      if (res == 1) {
        cout << "? 8 " << pos[1] << " " << pos[2] << " " << pos[3] << " ";
        cout << pos[n - 3] << " " << pos[n - 2] << " " << pos[n - 1] << " "
             << pos[n] << " " << i << endl;
        cin >> res;
        if (res == 1) {
          mod8[i] = 0;
        } else
          mod8[i] = 4;
      } else {
        mod4[i] = 2;
        cout << "? 8 " << pos[1] << " " << pos[3] << " " << pos[4] << " ";
        cout << pos[n - 3] << " " << pos[n - 2] << " " << pos[n - 1] << " "
             << pos[n] << " " << i << endl;
        cin >> res;
        if (res == 1) {
          mod8[i] = 6;
        } else {
          mod8[i] = 2;
        }
      }
    } else {
      cout << "? 4 " << pos[1] << " " << pos[2] << " " << pos[4] << " " << i
           << endl;
      cin >> res;
      if (res == 1) {
        mod4[i] = 1;
        cout << "? 8 " << pos[4] << " " << pos[2] << " " << pos[3] << " ";
        cout << pos[n - 3] << " " << pos[n - 2] << " " << pos[n - 1] << " "
             << pos[n] << " " << i << endl;
        cin >> res;
        if (res == 1) {
          mod8[i] = 5;
        } else {
          mod8[i] = 1;
        }
      } else {
        cout << "? 8 " << pos[1] << " " << pos[2] << " " << pos[4] << " ";
        cout << pos[n - 3] << " " << pos[n - 2] << " " << pos[n - 1] << " "
             << pos[n] << " " << i << endl;
        cin >> res;
        if (res == 1) {
          mod8[i] = 7;
        } else {
          mod8[i] = 3;
        }
        mod4[i] = 3;
      }
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (ok[i]) continue;
    long long M = 840, x, y;
    long long a, t, m, ans = 0;
    a = mod3[i];
    m = M / 3;
    exgcd(m, 3, t, x);
    ans += a * t * m;
    a = mod5[i];
    m = M / 5;
    exgcd(m, 5, t, x);
    ans += a * t * m;
    a = mod7[i];
    m = M / 7;
    exgcd(m, 7, t, x);
    ans += a * t * m;
    a = mod8[i];
    m = M / 8;
    exgcd(m, 8, t, x);
    ans += a * t * m;
    ans %= M;
    v[i] = ans;
  }
  upd();
  if (v[1] > n / 2) {
    for (long long i = 1; i <= n; i++) {
      v[i] = n + 1 - v[i];
    }
  }
  cout << "! ";
  for (long long i = 1; i <= n; i++) cout << v[i] << " ";
  cout << endl;
}
