#include<bits/stdc++.h>
using namespace std;
using UL = unsigned int;
using ULL = unsigned long long;
using LL = long long;
#define rep(i, n) for(UL i = 0; i < (n); i++)

struct Problem {
public:

	UL BitNum(UL a) {
		a = (a & 0x55555555) + ((a >> 1) & 0x55555555);
		a = (a & 0x33333333) + ((a >> 2) & 0x33333333);
		a = (a & 0x0f0f0f0f) + ((a >> 4) & 0x0f0f0f0f);
		a = (a & 0x00ff00ff) + ((a >> 8) & 0x00ff00ff);
		a = (a & 0x0000ffff) + ((a >> 16) & 0x0000ffff);
		return a;
	}

	void Solve() {
		UL N; scanf("%d", &N);
		UL K; scanf("%d", &K);
		rep(k, 1 << N) {
			if (BitNum(k) != K) continue;
			printf("%d:", k);
			rep(j, N) {
				if ((k >> j) & 1) printf(" %d", j);
			}
			printf("\n");
		}
	}
};

int main() {
	unique_ptr<Problem> p(new Problem());
	p->Solve();
	return 0;
}

