#include <iostream>
using namespace std;
int n, k, a[10], d = 1;
void pr() {
cout << d << ": ";
for (int i = 0; i < k; i++)
cout << a[i] << " ";
cout << endl;
d++;
}
void choose(int i, int start) {
for (int j = start; j <= n; j++) {
a[i] = j;
if (i == k - 1)
pr();
else
choose(i + 1, j + 1);
}
}
int main() {
cin >> n >> k;
choose(0, 1);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG4sIGssIGFbMTBdLCBkID0gMTsKCnZvaWQgcHIoKSB7CiAgICBjb3V0IDw8IGQgPDwgIjogIjsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgazsgaSsrKQogICAgICAgIGNvdXQgPDwgYVtpXSA8PCAiICI7CiAgICBjb3V0IDw8IGVuZGw7CiAgICBkKys7Cn0KCnZvaWQgY2hvb3NlKGludCBpLCBpbnQgc3RhcnQpIHsKICAgIGZvciAoaW50IGogPSBzdGFydDsgaiA8PSBuOyBqKyspIHsKICAgICAgICBhW2ldID0gajsKICAgICAgICBpZiAoaSA9PSBrIC0gMSkKICAgICAgICAgICAgcHIoKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIGNob29zZShpICsgMSwgaiArIDEpOwogICAgfQp9CgppbnQgbWFpbigpIHsKICAgIGNpbiA+PiBuID4+IGs7CiAgICBjaG9vc2UoMCwgMSk7Cn0K