#include <bits/stdc++.h>
using namespace std;
const int N = 805;
int tot = 0, n;
int pos[N], ans[N], tmp[N];
int parity[N], three[N], four[N], eight[N], five[N], seven[N];
int ask(vector<int> v) {
  ++tot;
  printf("? %d", (int)v.size());
  for (int i = 0; i < (int)v.size(); ++i) {
    printf(" %d", v[i]);
  }
  printf("\n");
  fflush(stdout);
  int typ;
  scanf("%d", &typ);
  return typ;
}
void get_first_and_last() {
  for (int i = 1; i <= n; ++i) {
    vector<int> v;
    for (int j = 1; j <= n; ++j) {
      if (i == j) continue;
      v.push_back(j);
    }
    if (ask(v)) {
      if (pos[1])
        pos[n] = i, ans[i] = n;
      else
        pos[1] = i, ans[i] = 1;
    }
  }
}
void get_parity() {
  vector<int> v;
  v.push_back(pos[1]);
  parity[pos[1]] = 1;
  for (int i = 1; i <= n; ++i) {
    if (i == pos[1] || i == pos[n]) continue;
    v.push_back(i);
    parity[i] = ask(v);
    v.pop_back();
  }
}
void get_first_and_last_2_to_6() {
  for (int rnd = 2; rnd <= 6; ++rnd) {
    if (n < 2 * rnd) continue;
    for (int i = 1; i <= n; ++i) tmp[i] = 0;
    for (int i = 1; i <= n; ++i) {
      int flag = 0;
      if (ans[i]) continue;
      vector<int> v;
      for (int j = 1; j <= n; ++j) {
        if (i == j || ans[j]) continue;
        v.push_back(j);
      }
      if (ask(v)) {
        if (rnd % 2 == 0) {
          if (parity[i])
            pos[n + 1 - rnd] = i, tmp[i] = n + 1 - rnd;
          else
            pos[rnd] = i, tmp[i] = rnd;
        } else {
          if (!parity[i])
            pos[n + 1 - rnd] = i, tmp[i] = n + 1 - rnd;
          else
            pos[rnd] = i, tmp[i] = rnd;
        }
      }
    }
    for (int i = 1; i <= n; ++i) {
      if (tmp[i]) ans[i] = tmp[i];
    }
  }
}
void get_four() {
  for (int i = 1; i <= n; ++i) {
    if (ans[i]) continue;
    vector<int> v;
    v.push_back(i);
    if (parity[i]) {
      for (int i = 2; i <= 4; ++i) {
        v.push_back(pos[i]);
      }
      if (ask(v))
        four[i] = 3;
      else
        four[i] = 1;
    } else {
      for (int i = 1; i <= 3; ++i) {
        v.push_back(pos[i]);
      }
      if (ask(v))
        four[i] = 2;
      else
        four[i] = 0;
    }
  }
}
void get_eight() {
  int tmp = (n + n - 1 + n - 2 + n - 3 + n - 4 + n - 5) % 8, vis[9] = {0};
  for (int i = 1; i <= 5; ++i) {
    vis[(8000 - tmp - i) % 8] = i;
  }
  for (int i = 1; i <= n; ++i) {
    if (ans[i]) continue;
    vector<int> v;
    for (int i = n - 5; i <= n; ++i) v.push_back(pos[i]);
    v.push_back(i);
    if (vis[four[i]]) {
      v.push_back(pos[vis[four[i]]]);
      if (ask(v))
        eight[i] = four[i];
      else
        eight[i] = four[i] + 4;
    } else {
      v.push_back(pos[vis[four[i] + 4]]);
      if (ask(v))
        eight[i] = four[i] + 4;
      else
        eight[i] = four[i];
    }
  }
}
void get_three() {
  for (int i = 1; i <= n; ++i) {
    if (ans[i]) continue;
    vector<int> v;
    v.push_back(i);
    v.push_back(pos[1]);
    v.push_back(pos[2]);
    if (ask(v))
      three[i] = 0;
    else {
      v.pop_back();
      v.push_back(pos[3]);
      if (ask(v))
        three[i] = 2;
      else
        three[i] = 1;
    }
  }
}
void get_five() {
  for (int i = 1; i <= n; ++i) {
    if (ans[i]) continue;
    for (int p = 1; p <= 4; ++p) {
      vector<int> v;
      v.push_back(i);
      for (int j = 1; j <= 5; ++j) {
        if (p == j) continue;
        v.push_back(pos[j]);
      }
      if (ask(v)) {
        five[i] = p;
        break;
      }
    }
    if (five[i] == -1) five[i] = 0;
  }
}
void get_seven() {
  int tmp = 0;
  vector<int> v;
  for (int i = n - 4; i <= n; ++i) {
    tmp = (tmp + 7000 - i) % 7;
    v.push_back(pos[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if (ans[i]) continue;
    v.push_back(i);
    for (int p = 1; p <= 6; ++p) {
      int now = (tmp + 7 - p) % 7;
      v.push_back(pos[p]);
      int state = ask(v);
      v.pop_back();
      if (state) {
        seven[i] = now;
        break;
      }
    }
    if (seven[i] == -1) seven[i] = tmp % 7;
    v.pop_back();
  }
}
void print_ans() {
  if (ans[1] > n / 2) {
    for (int i = 1; i <= n; ++i) ans[i] = n + 1 - ans[i];
  }
  printf("! ");
  for (int i = 1; i <= n; ++i) {
    printf("%d%c", ans[i], " \n"[i == n]);
  }
}
int main() {
  memset(three, -1, sizeof three);
  memset(seven, -1, sizeof seven);
  memset(five, -1, sizeof five);
  memset(four, -1, sizeof four);
  memset(eight, -1, sizeof eight);
  scanf("%d", &n);
  if (n == 2) {
    printf("! 1 2\n");
    return 0;
  }
  get_first_and_last();
  get_parity();
  get_first_and_last_2_to_6();
  if (n <= 12) {
    print_ans();
    return 0;
  }
  get_four();
  get_eight();
  get_three();
  get_five();
  get_seven();
  for (int i = 1; i <= n; ++i) {
    if (ans[i]) continue;
    ans[i] = (5 * 7 * 8 * three[i] + 3 * 7 * 8 * 2 * five[i] +
              3 * 5 * 8 * seven[i] + 3 * 5 * 7 * eight[i]) %
             840;
  }
  print_ans();
  return 0;
}
