#include <bits/stdc++.h>
using namespace std;
template <typename T>
void maxtt(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T& t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "URDL";
const long long MOD2 = (long long)1000000007 * (long long)1000000007;
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int& x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 1000000007) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
int rd(vector<int>& p) {
  printf("? %d", (int)p.size());
  for (int z : p) printf(" %d", z);
  puts("");
  fflush(stdout);
  int x;
  scanf("%d", &x);
  return x;
}
int pos[835], ans[835];
int md[10][835];
void sst(int x, int w) {
  pos[x] = w;
  ans[w] = x;
}
void ppt() {
  if (ans[1] > n / 2) {
    for (int(i) = 1; (i) <= (int)(n); (i)++) ans[i] = n + 1 - ans[i];
  }
  printf("!");
  for (int(i) = 1; (i) <= (int)(n); (i)++) printf(" %d", ans[i]);
  puts("");
  exit(0);
}
void init() {
  int hf = min(4, n / 2);
  for (int(i) = 1; (i) <= (int)(hf); (i)++) {
    vector<int> vv;
    for (int(ban) = 1; (ban) <= (int)(n); (ban)++)
      if (ans[ban] == 0) {
        vector<int> vp;
        for (int(i) = 1; (i) <= (int)(n); (i)++)
          if (i != ban && ans[i] == 0) {
            vp.push_back(i);
          }
        int x = rd(vp);
        if (x == 1) {
          vv.push_back(ban);
        }
        if (vv.size() == 2) break;
      }
    if (i == 1) {
      ans[vv[0]] = 1;
      ans[vv[1]] = n;
      pos[1] = vv[0];
      pos[n] = vv[1];
      for (int(i) = 1; (i) <= (int)(n); (i)++)
        if (ans[i] == 0) {
          vector<int> vp;
          vp.push_back(vv[0]);
          vp.push_back(i);
          if (rd(vp)) md[2][i] = 1;
        }
    } else {
      if (md[2][vv[0]] == 1) {
        if (i == 2 || i == 4) {
          swap(vv[1], vv[0]);
        }
      } else {
        if (i == 3) swap(vv[1], vv[0]);
      }
      sst(i, vv[0]);
      sst(n + 1 - i, vv[1]);
    }
  }
}
void cal3() {
  for (int(i) = 1; (i) <= (int)(n); (i)++)
    if (ans[i] == 0) {
      vector<int> vp(3, 0);
      vp[0] = pos[1];
      vp[1] = pos[2];
      vp[2] = i;
      if (rd(vp)) continue;
      vp[1] = pos[3];
      if (rd(vp)) {
        md[3][i] = 2;
        continue;
      }
      md[3][i] = 1;
    }
  vector<int> vp, V[10][10];
  for (int(i) = 1; (i) <= (int)(4); (i)++) {
    vp.push_back(pos[i]);
    vp.push_back(pos[n + 1 - i]);
  }
  sort(vp.begin(), vp.end());
  do {
    int s = 0;
    for (int(i) = 0; (i) < (int)(4); (i)++) s += ans[vp[i]];
    int t = (5 - s % 5) % 5;
    if (V[5][t].empty()) {
      for (int(i) = 0; (i) < (int)(4); (i)++) V[5][t].push_back(vp[i]);
    }
    s = 0;
    for (int(i) = 0; (i) < (int)(6); (i)++) s += ans[vp[i]];
    t = (7 - s % 7) % 7;
    if (V[7][t].empty()) {
      for (int(i) = 0; (i) < (int)(6); (i)++) V[7][t].push_back(vp[i]);
    }
    s = 0;
    for (int(i) = 0; (i) < (int)(7); (i)++) s += ans[vp[i]];
    t = s % 8;
    if (V[8][t].empty()) {
      for (int(i) = 0; (i) < (int)(7); (i)++) V[8][t].push_back(vp[i]);
    }
  } while (next_permutation(vp.begin(), vp.end()));
  for (int(i) = 1; (i) <= (int)(n); (i)++)
    if (ans[i] == 0) {
      for (int(z) = 0; (z) < (int)(5); (z)++) {
        vector<int> tmp = V[5][z];
        tmp.push_back(i);
        if (rd(tmp)) {
          md[5][i] = z;
          break;
        }
      }
      for (int(z) = 0; (z) < (int)(7); (z)++) {
        vector<int> tmp = V[7][z];
        tmp.push_back(i);
        if (rd(tmp)) {
          md[7][i] = z;
          break;
        }
      }
      if (md[2][i] == 0) {
        vector<int> tmp(4, 0);
        tmp[0] = pos[1];
        tmp[1] = pos[2];
        tmp[2] = pos[3];
        tmp[3] = i;
        if (rd(tmp))
          md[4][i] = 2;
        else
          md[4][i] = 0;
      } else {
        vector<int> tmp(4, 0);
        tmp[0] = pos[1];
        tmp[1] = pos[2];
        tmp[2] = pos[4];
        tmp[3] = i;
        if (rd(tmp))
          md[4][i] = 1;
        else
          md[4][i] = 3;
      }
      int M = md[4][i];
      if (M == 0) {
        vector<int> tmp = V[8][0];
        tmp.push_back(i);
        if (rd(tmp))
          md[8][i] = 0;
        else
          md[8][i] = 4;
      } else if (M == 1) {
        vector<int> tmp = V[8][3];
        tmp.push_back(i);
        if (rd(tmp))
          md[8][i] = 5;
        else
          md[8][i] = 1;
      } else if (M == 2) {
        vector<int> tmp = V[8][2];
        tmp.push_back(i);
        if (rd(tmp))
          md[8][i] = 6;
        else
          md[8][i] = 2;
      } else {
        vector<int> tmp = V[8][1];
        tmp.push_back(i);
        if (rd(tmp))
          md[8][i] = 7;
        else
          md[8][i] = 3;
      }
    }
}
void fmain(int tid) {
  scanf("%d", &n);
  init();
  if (n <= 8) ppt();
  cal3();
  for (int(i) = 1; (i) <= (int)(n); (i)++)
    if (ans[i] == 0) {
      for (int(j) = 1; (j) <= (int)(n); (j)++)
        if (pos[j] == 0) {
          if (j % 3 == md[3][i] && j % 5 == md[5][i] && j % 7 == md[7][i] &&
              j % 8 == md[8][i]) {
            sst(j, i);
            break;
          }
        }
    }
  ppt();
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
