f = lambda x,y:[n for n in range(1<<x+y)if bin(n).count('1')==y]

for (x, y) in (0, 1), (1, 1), (3, 2):
	print (x, y), f(x, y)