#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
	unsigned int	N;
	cin >> N;
	int	M;
	cin >> M;
	rep(i, 1 << N)
	{
		if (__builtin_popcount(i) != M)
			continue;
		cout << i << ':';
		rep(j, N)
		{
			if (i & (1 << j))	
				cout << ' ' << j;
		}
		cout << endl;
	}
}

