import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class ransom_nv {
    int n, k;
    BigInteger TWO = new BigInteger("2");

    String quary(int count, int pos, int add) {
	StringBuilder s = new StringBuilder();
	for (int i = 0; i < count; i++) {
	    if (i != pos)
		s.append((i + 1) + " ");
	}
	if (add != -1)
	    s.append(add + 1);
	return s.toString().trim();
    }

    BigInteger sqrtK(BigInteger val, int pow) {
	if (pow == 1 || val.compareTo(BigInteger.ONE) == 0)
	    return val;
	BigInteger l = BigInteger.ZERO;
	BigInteger r = val;
	while (l.add(BigInteger.ONE).compareTo(r) != 0) {
	    BigInteger m = l.add(r).divide(TWO);
	    if (m.pow(pow).compareTo(val) > 0) {
		r = m;
	    } else {
		l = m;
	    }
	}
	return l;
    }

    void solve() throws IOException {
	n = nextInt();
	k = nextInt();
	BigInteger[] ans = new BigInteger[n];
	BigInteger[] tmp = new BigInteger[k + 1];
	for (int i = 0; i < k + 1; i++) {
	    out.println(quary(k + 1, i, -1));
	    out.flush();
	    tmp[i] = new BigInteger(nextToken());
	}
	BigInteger prod = BigInteger.ONE;
	for (int i = 0; i < k + 1; i++) {
	    prod = prod.multiply(tmp[i]);
	}
	prod = sqrtK(prod, k);
	for (int i = 0; i < k + 1; i++) {
	    ans[i] = prod.divide(tmp[i]);
	}
	prod = tmp[k].divide(ans[k - 1]);

	for (int i = k + 1; i < n; i++) {
	    out.println(quary(k, k - 1, i));
	    out.flush();
	    ans[i] = (new BigInteger(nextToken())).divide(prod);
	}
	out.print("answer:");
	for (BigInteger b : ans)
	    out.print(" " + b);
	out.println();
	out.flush();
    }

    BufferedReader br;
    StringTokenizer st;
    PrintWriter out;

    void run() {
	try {
	    br = new BufferedReader(new InputStreamReader(System.in));
	    out = new PrintWriter(System.out);
	    solve();
	    out.close();
	} catch (IOException e) {
	    e.printStackTrace();
	}
    }

    public static void main(String[] args) {
	new ransom_nv().run();
    }

    String nextToken() throws IOException {
	while ((st == null) || !st.hasMoreTokens())
	    st = new StringTokenizer(br.readLine());
	return st.nextToken();
    }

    int nextInt() throws NumberFormatException, IOException {
	return Integer.parseInt(nextToken());
    }
}
