from itertools import combinations as c m,n = map(int,input().split(' ')) lt = list(c([_ for _ in range(1,m+1)],n)) for i in lt: print(*[_ for _ in i],sep = '')