#include <iostream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <bitset>
#include <cmath>

using namespace std;

int main()
{

    bitset<18> subset, T;
    
    int n, k;
    cin >> n >> k;

    int upper = pow(2, n);
    for (int i = 0; i < upper; i++)
    {
        subset = i;
        if (subset.count() == k)
        {
            cout << i << ":";            
            for (int j = 0; j < n; j++)
            {
                if (subset[j])
                {
                    cout << ' ' <<  j;
                }
            }
            cout << endl;            
        }

    }
}
