#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vecll = vector<long long>;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define all(n) (n).begin(), (n).end()

int main()
{
    ll n, k;
    cin >> n >> k;
    for (ll bit = 0; bit <(1<< n);bit++) {
        bitset<18> bitcnt = bit;
        vector<ll> S;
        if ((int)(bitcnt.count())==k) {
            for (ll i=0;i<n;i++)
            {
                if (bit & (1<<i))
                    S.push_back(i);
            }

            cout << bit << ":";
            for (ll i=0;i<(int)(S.size());i++)
            {
                cout << " " << S[i];
            }
            cout << endl;
        }
    }
}
