#include <bits/stdc++.h>
using namespace std;
bool ask(vector<int> vt) {
  printf("? %d ", (int)vt.size());
  for (int i = 0; i < vt.size(); i++) printf("%d ", vt[i]);
  printf("\n");
  fflush(stdout);
  int x;
  scanf("%d", &x);
  return x;
}
int id[3][5][7][8], ans[1005];
pair<int, int> num[10];
vector<int> vt[10];
bool vis1[10];
void dfs(int s1, int s2, int p, int d, vector<int> q) {
  if (s1 == p - 1) {
    if (!vis1[s2]) {
      vis1[s2] = 1;
      vt[s2] = q;
    }
    return;
  }
  if (d > 8) return;
  dfs(s1, s2, p, d + 1, q);
  q.push_back(num[d].second);
  dfs(s1 + 1, (s2 + num[d].first) % p, p, d + 1, q);
}
bool vis2[1005];
int val[1005][4];
void solve_prime(int n, int p, int d) {
  memset(vis1, 0, sizeof(vis1));
  dfs(0, 0, p, 1, vector<int>());
  memset(vis2, 0, sizeof(vis2));
  for (int i = 0; i < p - 1; i++)
    for (int j = 1; j <= n; j++)
      if (!vis2[j] && !ans[j]) {
        vector<int> cur = vt[(p - i) % p];
        cur.push_back(j);
        if (ask(cur)) {
          vis2[j] = 1;
          val[j][d] = i;
        }
      }
  for (int i = 1; i <= n; i++)
    if (!vis2[i] && !ans[i]) val[i][d] = p - 1;
}
void solve_8(int n) {
  memset(vis1, 0, sizeof(vis1));
  dfs(0, 0, 2, 1, vector<int>());
  for (int i = 1; i <= n; i++) {
    if (ans[i]) continue;
    int v = val[i][3];
    if (vis1[(2 - v) % 2]) {
      vector<int> cur = vt[(2 - v) % 2];
      cur.push_back(i);
      if (ask(cur))
        val[i][3] = v;
      else
        val[i][3] = v + 1;
    } else {
      v += 1;
      vector<int> cur = vt[(2 - v) % 2];
      cur.push_back(i);
      if (ask(cur))
        val[i][3] = v;
      else
        val[i][3] = v - 1;
    }
  }
  memset(vis1, 0, sizeof(vis1));
  dfs(0, 0, 4, 1, vector<int>());
  for (int i = 1; i <= n; i++) {
    if (ans[i]) continue;
    int v = val[i][3];
    if (vis1[(4 - v) % 4]) {
      vector<int> cur = vt[(4 - v) % 4];
      cur.push_back(i);
      if (ask(cur))
        val[i][3] = v;
      else
        val[i][3] = v + 2;
    } else {
      v += 2;
      vector<int> cur = vt[(4 - v) % 4];
      cur.push_back(i);
      if (ask(cur))
        val[i][3] = v;
      else
        val[i][3] = v - 2;
    }
  }
  memset(vis1, 0, sizeof(vis1));
  dfs(0, 0, 8, 1, vector<int>());
  for (int i = 1; i <= n; i++) {
    if (ans[i]) continue;
    int v = val[i][3];
    if (vis1[(8 - v) % 8]) {
      vector<int> cur = vt[(8 - v) % 8];
      cur.push_back(i);
      if (ask(cur))
        val[i][3] = v;
      else
        val[i][3] = v + 4;
    } else {
      v += 4;
      vector<int> cur = vt[(8 - v) % 8];
      cur.push_back(i);
      if (ask(cur))
        val[i][3] = v;
      else
        val[i][3] = v - 4;
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  bool v = 0;
  int fir = 0;
  for (int i = 1; i <= n; i++) {
    vector<int> cur;
    for (int j = 1; j <= n; j++)
      if (j != i) cur.push_back(j);
    if (ask(cur)) {
      ans[i] = ((!v) ? 1 : n);
      if (ans[i] == 1) fir = i;
      v = 1;
    }
  }
  for (int i = 2; i <= (n >> 1) && i <= 4; i++)
    for (int j = 1; j <= n; j++) {
      vector<int> cur;
      for (int k = 1; k <= n; k++)
        if (k != j && (!ans[k] || min(ans[k], n - ans[k] + 1) >= i))
          cur.push_back(k);
      if (ask(cur)) {
        cur.clear();
        cur.push_back(fir);
        cur.push_back(j);
        ans[j] = ((ask(cur) ^ (i & 1)) ? n - i + 1 : i);
      }
    }
  if (n > 8) {
    int sz = 0;
    for (int i = 1; i <= n; i++)
      if (ans[i]) num[++sz] = pair<int, int>(ans[i], i);
    sort(num + 1, num + sz + 1);
    solve_prime(n, 3, 0);
    solve_prime(n, 5, 1);
    solve_prime(n, 7, 2);
    solve_8(n);
    for (int i = 1; i <= n; i++) id[i % 3][i % 5][i % 7][i % 8] = i;
    for (int i = 1; i <= n; i++)
      if (!ans[i]) ans[i] = id[val[i][0]][val[i][1]][val[i][2]][val[i][3]];
  }
  if (ans[1] > (n >> 1)) {
    for (int i = 1; i <= n; i++) ans[i] = n - ans[i] + 1;
  }
  printf("! ");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  fflush(stdout);
  return 0;
}
