#include <bits/stdc++.h>
using namespace std;
int n, x, y, cxcc[1234], sl, da, zc, pd;
bool cx(int k) {
  printf("? %d", k);
  for (int i = 1; i <= k; i++) cout << " " << cxcc[i];
  cout << endl;
  int sr;
  scanf("%d", &sr);
  return sr == y || sr == (x ^ y);
}
int main() {
  scanf("%d%d%d", &n, &x, &y);
  int i, j;
  for (i = 1; i <= n; i *= 2) {
    sl = 0;
    for (j = 1; j <= n; j++)
      if (j & i) cxcc[++sl] = j;
    if (cx(sl)) {
      zc ^= i;
      if (!pd) {
        int zb = 1, yb = sl - 1, zj = sl;
        while (zb <= yb) {
          int zczj = zb + yb >> 1;
          if (cx(zczj))
            zj = zczj, yb = zczj - 1;
          else
            zb = zczj + 1;
        }
        da = cxcc[zj];
        pd = 1;
      }
    }
  }
  if (da > (da ^ zc)) da ^= zc;
  printf("! %d %d\n", da, da ^ zc);
  return 0;
}
