#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0;
  bool flg = false;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') flg = true;
  for (; isdigit(ch); ch = getchar()) x = (x << 3) + (x << 1) + (ch ^ 48);
  return flg ? -x : x;
}
int n;
int q[810], p[810];
bool ask(const vector<int> &S) {
  printf("? %d", int(S.size()));
  for (int x : S) printf(" %d", x);
  puts("");
  fflush(stdout);
  int z = read();
  assert(~z);
  return z;
}
void solve() {
  n = read();
  for (int i(1), _i(n); i <= _i; i++) {
    vector<int> S(n);
    iota((S).begin(), (S).end(), 1);
    S.erase(find((S).begin(), (S).end(), i));
    static int c = 0;
    if (!ask(S)) continue;
    if ((++c) == 1)
      q[1] = i, p[i] = -1;
    else {
      q[n] = i, p[i] = -1;
      break;
    }
  }
  for (int l = 1, r = n - l + 1, t = 0; l + 1 <= r - 1;
       l <<= 1, r = n - l + 1, ++t) {
    int s = 0;
    const int L = l << 1;
    for (int i(1), _i(l); i <= _i; i++) s = (s + i) % L;
    for (int i(r), _i(n); i <= _i; i++) s = (s + i) % L;
    for (int i(1), _i(n); i <= _i; i++)
      if (~p[i]) {
        vector<int> S = {i};
        int o = -1;
        for (int j(1), _j(l); j <= _j; j++)
          if ((s - j + p[i] + l) % l)
            S.push_back(q[j]);
          else
            o = j;
        for (int j(r), _j(n); j <= _j; j++) S.push_back(q[j]);
        assert(~o);
        if (((s - o + p[i] + L) % L == 0) == ask(S))
          ;
        else
          p[i] |= 1 << t;
      }
    for (int i = 1; i <= l && l + i < r - i; ++i) {
      vector<int> S;
      for (int j(1), _j(n); j <= _j; j++)
        if (~p[j]) S.push_back(j);
      const int x = l + i, y = r - i;
      for (int j(1), _j(n); j <= _j; j++)
        if (p[j] % L == x % L) {
          vector<int> T(S);
          T.erase(find((T).begin(), (T).end(), j));
          if (ask(T)) {
            p[j] = -1;
            q[x] = j;
            break;
          }
        }
      for (int j(1), _j(n); j <= _j; j++)
        if (p[j] % L == y % L) {
          vector<int> T(S);
          T.erase(find((T).begin(), (T).end(), j));
          if (ask(T)) {
            p[j] = -1;
            q[y] = j;
            break;
          }
        }
    }
  }
  for (int i(1), _i(n); i <= _i; i++) p[q[i]] = i;
  if (p[1] * 2 > n) {
    for (int i(1), _i(n); i <= _i; i++) p[i] = n - p[i] + 1;
  }
  printf("!");
  for (int i(1), _i(n); i <= _i; i++) printf(" %d", p[i]);
  puts("");
  fflush(stdout);
}
int main() {
  for (int T = 1; T--;) solve();
  return 0;
}
