from math import comb
n, i = map(int, input().split())
ans = []
while n:
    l, r = 0, 1
    while comb(r, i) <= n:
        l, r = r, 2 * r
    while r - l > 1:
        c = (l + r) // 2
        if comb(c, i) <= n:
            l = c
        else:
            r = c
    ans.append(l)
    n -= comb(l, i)
    i -= 1
print(*ans)