#include<iostream>
using namespace std;

int main(){
	int n, k, b, T = 0;
	
	cin>>n>>k;
	
	for(int i = 0; i < (1<<n); i++){
		int count = 0;
		for(int t = i; t; t &= t-1) count++;
		if(count != k)continue;
		
		cout<<i<<":";
		for(int j = 0, k = i; k; j++){
			if(k&(1<<j)){
				cout<<" "<<j;
				k &= ~(1<<j);
			}
		}
		cout<<endl;
	}
	
	return 0;
}
