#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int first = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) {
    if (ch == '-') f = -1;
  }
  for (; isdigit(ch); ch = getchar()) {
    first = first * 10 + ch - 48;
  }
  return first * f;
}
const int mxN = 800;
const int P[5] = {2, 3, 5, 7, 8};
int a[mxN + 3], ai[mxN + 3];
int b[mxN + 3][5];
int n;
void exgcd(int a, int b, int &first, int &second) {
  if (b == 0) {
    first = 1, second = 0;
    return;
  }
  exgcd(b, a % b, first, second);
  int z = first;
  first = second;
  second = z - (a / b) * first;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    printf("? %d ", n - 1);
    for (int j = 1; j <= n; j++) {
      if (j != i) printf("%d ", j);
    }
    puts("");
    fflush(stdout);
    int ret;
    scanf("%d", &ret);
    if (ret) {
      if (ai[1]) {
        ai[n] = i, a[i] = n;
      } else {
        ai[1] = i, a[i] = 1;
      }
    }
  }
  memset(b, -1, sizeof(b));
  b[ai[1]][0] = 1, b[ai[n]][0] = 0;
  for (int i = 1; i <= n; i++)
    if (!a[i]) {
      printf("? 2 %d %d\n", ai[1], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      b[i][0] = ret;
    }
  for (int i = 2; i <= min(n / 2, 4); i++) {
    for (int j = 1; j <= n; j++)
      if (!a[j]) {
        printf("? %d ", n - 2 * i + 1);
        for (int k = 1; k <= n; k++) {
          if (!a[k] && k != j) printf("%d ", k);
        }
        puts("");
        fflush(stdout);
        int ret;
        scanf("%d", &ret);
        if (ret) {
          if (b[j][0] == (i & 1)) {
            ai[i] = j;
          } else {
            ai[n - i + 1] = j;
          }
        }
      }
    for (int j = 1; j <= n; j++) a[ai[j]] = j;
  }
  if (n <= 8) {
    if (a[1] > n / 2) {
      for (int i = 1; i <= n; i++) a[i] = n + 1 - a[i];
    }
    printf("! ");
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    puts("");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][1] == -1) {
      printf("? 3 %d %d %d\n", ai[1], ai[2], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][1] = 0;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][1] == -1) {
      printf("? 3 %d %d %d\n", ai[1], ai[3], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][1] = 2;
      } else {
        b[i][1] = 1;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][2] == -1) {
      printf("? 5 %d %d %d %d %d\n", ai[1], ai[2], ai[n - 1], ai[n], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][2] = (n * 3 + 3) % 5;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][2] == -1) {
      printf("? 5 %d %d %d %d %d\n", ai[1], ai[3], ai[n - 1], ai[n], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][2] = (n * 3 + 2) % 5;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][2] == -1) {
      printf("? 5 %d %d %d %d %d\n", ai[1], ai[4], ai[n - 1], ai[n], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][2] = (n * 3 + 1) % 5;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][2] == -1) {
      printf("? 5 %d %d %d %d %d\n", ai[2], ai[4], ai[n - 1], ai[n], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][2] = (n * 3) % 5;
      } else {
        b[i][2] = (n * 3 + 4) % 5;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][3] == -1) {
      printf("? 7 %d %d %d %d %d %d %d\n", ai[1], ai[2], ai[3], ai[n - 3],
             ai[n - 2], ai[n - 1], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][3] = (n * 4) % 7;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][3] == -1) {
      printf("? 7 %d %d %d %d %d %d %d\n", ai[1], ai[2], ai[4], ai[n - 3],
             ai[n - 2], ai[n - 1], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][3] = (n * 4 + 6) % 7;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][3] == -1) {
      printf("? 7 %d %d %d %d %d %d %d\n", ai[1], ai[3], ai[4], ai[n - 3],
             ai[n - 2], ai[n - 1], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][3] = (n * 4 + 5) % 7;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][3] == -1) {
      printf("? 7 %d %d %d %d %d %d %d\n", ai[2], ai[3], ai[4], ai[n - 3],
             ai[n - 2], ai[n - 1], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][3] = (n * 4 + 4) % 7;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][3] == -1) {
      printf("? 7 %d %d %d %d %d %d %d\n", ai[2], ai[3], ai[4], ai[n - 3],
             ai[n - 2], ai[n], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][3] = (n * 4 + 3) % 7;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i] && b[i][3] == -1) {
      printf("? 7 %d %d %d %d %d %d %d\n", ai[2], ai[3], ai[4], ai[n - 3],
             ai[n - 1], ai[n], i);
      fflush(stdout);
      int ret;
      scanf("%d", &ret);
      if (ret) {
        b[i][3] = (n * 4 + 2) % 7;
      } else {
        b[i][3] = (n * 4 + 1) % 7;
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i]) {
      if (b[i][0]) {
        printf("? 4 %d %d %d %d\n", ai[1], ai[2], ai[4], i);
        fflush(stdout);
        int ret;
        scanf("%d", &ret);
        if (ret) {
          printf("? 8 %d %d %d %d %d %d %d %d\n", ai[2], ai[3], ai[4],
                 ai[n - 3], ai[n - 2], ai[n - 1], ai[n], i);
          fflush(stdout);
          int ret;
          scanf("%d", &ret);
          b[i][4] = ret ? 5 : 1;
        } else {
          printf("? 8 %d %d %d %d %d %d %d %d\n", ai[1], ai[2], ai[4],
                 ai[n - 3], ai[n - 2], ai[n - 1], ai[n], i);
          fflush(stdout);
          int ret;
          scanf("%d", &ret);
          b[i][4] = ret ? 7 : 3;
        }
      } else {
        printf("? 4 %d %d %d %d\n", ai[1], ai[2], ai[3], i);
        fflush(stdout);
        int ret;
        scanf("%d", &ret);
        if (ret) {
          printf("? 8 %d %d %d %d %d %d %d %d\n", ai[1], ai[3], ai[4],
                 ai[n - 3], ai[n - 2], ai[n - 1], ai[n], i);
          fflush(stdout);
          int ret;
          scanf("%d", &ret);
          b[i][4] = ret ? 6 : 2;
        } else {
          printf("? 8 %d %d %d %d %d %d %d %d\n", ai[1], ai[2], ai[3],
                 ai[n - 3], ai[n - 2], ai[n - 1], ai[n], i);
          fflush(stdout);
          int ret;
          scanf("%d", &ret);
          b[i][4] = ret ? 0 : 4;
        }
      }
    }
  for (int i = 1; i <= n; i++)
    if (!a[i]) {
      int p = 1;
      for (int j = 1; j <= 4; j++) {
        int first, second;
        exgcd(p, P[j], first, second);
        int coe = b[i][j] - a[i];
        first *= coe, second *= coe;
        int tp = p * P[j];
        a[i] = ((p * first + a[i]) % tp + tp) % tp;
        p = tp;
      }
    }
  if (a[1] > n / 2) {
    for (int i = 1; i <= n; i++) a[i] = n + 1 - a[i];
  }
  printf("! ");
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  puts("");
  return 0;
}
