#include <bits/stdc++.h>
using namespace std;

#define reps(i, n, m) for (int i = (int) (n); i < (int) (m); i++)
#define rep(i, n) reps(i, 0, (n))
#define all(v) (v).begin(), (v).end()

int main() {
    int n, k; cin >> n >> k;
    rep(a, 1 << n) {
        bitset<18> b(a);
        if (b.count() == k) {
            cout << a << ":";
            rep(i, 18) {
                if ((a >> i) & 1) cout << " " << i;
            }
			cout << endl;
        }
    }
}
