#include <bits/stdc++.h>
int read() {
  int r = 0, t = 1, c = getchar();
  while (c < '0' || c > '9') {
    t = c == '-' ? -1 : 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    r = r * 10 + c - 48;
    c = getchar();
  }
  return r * t;
}
const int N = 1 << 15 | 10;
int p[N], n, P[N];
int vis[N];
int m;
int t[N], T[N];
std::vector<int> id[N];
int val[N], op = 0;
int cnt;
int query(std::vector<int> a) {
  cnt++;
  if (op != 2 && op != 4) {
    printf("? %d", a.size());
    for (auto i : a) printf(" %d", i);
    putchar(10);
    fflush(stdout);
  }
  if (!op) return read();
  int u = 0, v = 0;
  for (auto i : a) {
    u++;
    v += val[i];
  }
  return v % u == 0;
}
int main() {
  n = read();
  m = n;
  int flag = 0;
  if (op) {
    if (op <= 2)
      for (int i = (1), end_i = (n); i <= end_i; i++) val[i] = read();
    else {
      for (int i = (1), end_i = (n); i <= end_i; i++) val[i] = i;
      srand((unsigned long long)new char);
      std::random_shuffle(val + 1, val + n + 1);
      if (val[1] > n / 2)
        for (int i = (1), end_i = (n); i <= end_i; i++) val[i] = n + 1 - val[i];
    }
  }
  for (int i = (1), end_i = (n); i <= end_i; i++) {
    std::vector<int> a;
    for (int j = (1), end_j = (n); j <= end_j; j++)
      if (i != j) a.push_back(j);
    if (query(a)) {
      if (flag)
        vis[P[i] = p[i] = n] = 1;
      else {
        vis[P[i] = p[i] = 1] = 1;
        flag = 1;
      }
    }
  }
  for (int i = (1), end_i = (n); i <= end_i; i++)
    if (p[i]) t[i] = -1;
  for (int o = (0), end_o = (30); o <= end_o; o++)
    if ((m >> (o + 1)) > 1) {
      int s = (1 << (o + 1)) - 1;
      for (int i = (0), end_i = (s); i <= end_i; i++) id[i].clear();
      for (int i = (1), end_i = (n); i <= end_i; i++)
        if (p[i]) id[p[i] & s].push_back(i);
      for (int i = (0), end_i = (s); i <= end_i; i++) assert(!id[i].empty());
      for (int i = (1), end_i = (n); i <= end_i; i++) T[i] = 0;
      for (int _t = (1), end__t = ((m >> (o + 1)) % 2 == 0 ? 1
                                   : m == (3 << (o + 1))   ? 2
                                                           : 2);
           _t <= end__t; _t++)
        for (int j = (0), end_j = ((1 << o) - 1); j <= end_j; j++) {
          if (_t == 1) {
            if (j) assert(id[0].size() >= 2);
            for (int i = (1), end_i = (n); i <= end_i; i++)
              if (t[i] == j) {
                if (P[i]) {
                  T[i] = P[i] & s;
                  continue;
                }
                std::vector<int> a = {i};
                if (!j)
                  for (int k = (1), end_k = (s); k <= end_k; k++)
                    a.push_back(id[k][0]);
                else {
                  a.push_back(id[0][1]);
                  for (int k = (0), end_k = (s); k <= end_k; k++)
                    if (k != (1 << o) && k != j + (1 << o))
                      a.push_back(id[k][0]);
                }
                T[i] = t[i];
                if (query(a)) T[i] |= (1 << o);
              }
          }
          int x = 0, y = 0;
          int u = 0, v = 0;
          int Cnt = 0;
          for (int i = (1), end_i = (n); i <= end_i; i++)
            if (t[i] == j) Cnt++;
          for (int i = (1), end_i = (n); i <= end_i; i++)
            if (!vis[i] && (i & ((1 << o) - 1)) == j) {
              if (!u) u = i;
              v = i;
            }
          for (int i = (1), end_i = (n); i <= end_i; i++)
            if (t[i] == j) {
              if (P[i]) {
                if (P[i] == u) x = i;
                if (P[i] == v) y = i;
                continue;
              }
              std::vector<int> a;
              for (int k = (1), end_k = (n); k <= end_k; k++)
                if (t[k] == j && k != i) a.push_back(k);
              if (Cnt == 2 || query(a)) {
                if (T[i] == (u & s))
                  x = i;
                else
                  y = i;
              }
              if (x && y) break;
            }
          vis[P[x] = p[x] = u] = 1;
          vis[P[y] = p[y] = v] = 1;
          t[x] = t[y] = -1;
          id[u & s].push_back(x);
          id[v & s].push_back(y);
          assert(x && y);
        }
      if ((m >> (o + 1)) % 2 == 1 && m > (3 << (o + 1))) {
        m -= (1 << (o + 1));
      }
      for (int i = (1), end_i = (n); i <= end_i; i++)
        if (!p[i])
          t[i] = T[i];
        else
          t[i] = -1;
    } else
      break;
  if (p[1] > n / 2)
    for (int i = (1), end_i = (n); i <= end_i; i++) p[i] = n + 1 - p[i];
  printf("! ");
  for (int i = (1), end_i = (n); i <= end_i; i++)
    printf("%d%c", p[i], i == n ? '\n' : ' ');
  if (op)
    for (int i = (1), end_i = (n); i <= end_i; i++) assert(p[i] == val[i]);
  return 0;
}
