#include <bits/stdc++.h>
using namespace std;
const int N = 810;
int n, q[3], a[N], mod[N][9], p[N];
void finish() {
  if (a[1] * 2 > n)
    for (int i = 1; i <= n; ++i) a[i] = n - a[i] + 1;
  printf("! ");
  for (int i = 1; i <= n; ++i) printf("%d ", a[i]);
  puts("");
  exit(0);
}
void flush() {
  putchar('\n');
  fflush(stdout);
}
int get(int x, int mm) { return ((-x) % mm + mm) % mm; }
signed main() {
  int test = 1;
  cin >> n;
  for (int i = 1, x; i <= 4 && i * 2 <= n; ++i) {
    int cnt = 0;
    for (int j = 1; j <= n && cnt < 2; ++j) {
      if (a[j]) continue;
      printf("? %d ", n - 2 * i + 1);
      for (int k = 1; k <= n; ++k)
        if (j != k && !a[k]) printf("%d ", k);
      flush();
      cin >> x;
      if (x) q[++cnt] = j;
    }
    if (a[q[1]]) break;
    if (i == 1) {
      a[q[1]] = 1, a[q[2]] = n, p[1] = q[1], p[n] = q[2];
      mod[q[1]][2] = 1, mod[q[2]][2] = 0;
      for (int j = 1; j <= n; ++j)
        if (!a[j]) printf("? 2 %d %d", q[1], j), flush(), cin >> mod[j][2];
    } else {
      if ((i & 1) == mod[q[1]][2])
        a[q[1]] = i, a[q[2]] = n - i + 1, p[i] = q[1], p[n - i + 1] = q[2];
      else
        a[q[1]] = n - i + 1, a[q[2]] = i, p[i] = q[2], p[n - i + 1] = q[1];
    }
  }
  if (n <= 8) finish();
  for (int i = 1, x; i <= n; ++i) {
    if (a[i]) continue;
    printf("? 3 %d %d %d", p[1], p[2], i);
    flush();
    cin >> x;
    if (x) continue;
    printf("? 3 %d %d %d", p[2], p[3], i);
    flush();
    cin >> x;
    mod[i][3] = x ? 1 : 2;
  }
  for (int i = 1, x; i <= n; ++i) {
    if (a[i]) continue;
    printf("? 5 %d %d %d %d %d", p[1], p[2], p[3], p[n], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][5] = get(n + 6, 5);
      continue;
    }
    printf("? 5 %d %d %d %d %d", p[1], p[2], p[4], p[n], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][5] = get(n + 7, 5);
      continue;
    }
    printf("? 5 %d %d %d %d %d", p[1], p[3], p[4], p[n], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][5] = get(n + 8, 5);
      continue;
    }
    printf("? 5 %d %d %d %d %d", p[2], p[3], p[4], p[n], i);
    flush();
    cin >> x;
    mod[i][5] = x ? get(n + 9, 5) : get(n, 5);
  }
  for (int i = 1, x; i <= n; ++i) {
    if (a[i]) continue;
    printf("? 7 %d %d %d %d %d %d %d", p[1], p[2], p[3], p[n - 3], p[n - 2],
           p[n - 1], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][7] = get(3 * n, 7);
      continue;
    }
    printf("? 7 %d %d %d %d %d %d %d", p[1], p[2], p[3], p[n - 3], p[n - 2],
           p[n], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][7] = get(3 * n + 1, 7);
      continue;
    }
    printf("? 7 %d %d %d %d %d %d %d", p[1], p[2], p[3], p[n - 3], p[n - 1],
           p[n], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][7] = get(3 * n + 2, 7);
      continue;
    }
    printf("? 7 %d %d %d %d %d %d %d", p[1], p[2], p[3], p[n - 2], p[n - 1],
           p[n], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][7] = get(3 * n + 3, 7);
      continue;
    }
    printf("? 7 %d %d %d %d %d %d %d", p[1], p[2], p[4], p[n - 2], p[n - 1],
           p[n], i);
    flush();
    cin >> x;
    if (x) {
      mod[i][7] = get(3 * n + 4, 7);
      continue;
    }
    printf("? 7 %d %d %d %d %d %d %d", p[1], p[3], p[4], p[n - 2], p[n - 1],
           p[n], i);
    flush();
    cin >> x;
    mod[i][7] = x ? get(3 * n + 5, 7) : get(3 * n + 6, 7);
  }
  for (int i = 1, x; i <= n; ++i) {
    if (a[i]) continue;
    if (mod[i][2] == 0) {
      printf("? 4 %d %d %d %d", p[1], p[2], p[3], i);
      flush();
      cin >> x;
      mod[i][4] = x ? 2 : 0;
    } else {
      printf("? 4 %d %d %d %d", p[1], p[2], p[4], i);
      flush();
      cin >> x;
      mod[i][4] = x ? 1 : 3;
    }
  }
  for (int i = 1, x; i <= n; ++i) {
    if (a[i]) continue;
    if (mod[i][4] == 0) {
      printf("? 8 %d %d %d %d %d %d %d %d", p[1], p[2], p[3], p[n - 3],
             p[n - 2], p[n - 1], p[n], i);
      flush();
      cin >> x;
      mod[i][8] = x ? 0 : 4;
    }
    if (mod[i][4] == 1) {
      printf("? 8 %d %d %d %d %d %d %d %d", p[2], p[3], p[4], p[n - 3],
             p[n - 2], p[n - 1], p[n], i);
      flush();
      cin >> x;
      mod[i][8] = x ? 5 : 1;
    }
    if (mod[i][4] == 2) {
      printf("? 8 %d %d %d %d %d %d %d %d", p[1], p[3], p[4], p[n - 3],
             p[n - 2], p[n - 1], p[n], i);
      flush();
      cin >> x;
      mod[i][8] = x ? 6 : 2;
    }
    if (mod[i][4] == 3) {
      printf("? 8 %d %d %d %d %d %d %d %d", p[1], p[2], p[4], p[n - 3],
             p[n - 2], p[n - 1], p[n], i);
      flush();
      cin >> x;
      mod[i][8] = x ? 7 : 3;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (a[i]) continue;
    for (int j = 1; j <= n; ++j)
      if (j % 3 == mod[i][3] && j % 5 == mod[i][5] && j % 7 == mod[i][7] &&
          j % 8 == mod[i][8]) {
        a[i] = j;
        break;
      }
  }
  finish();
}
