N,M = map(int,input().split()) dat = [M] for i in range(2,N+1): l = [(dat[j],-j) for j in range(i-1)] l.sort(reverse = True) t = 0 for j in dat: if j == -1: t += 1 k = i // 2 if t >= k: dat = [0] * (i - 1) + [M] continue count = 0 s = set() for j in range(i - 1 - k): count += l[j][0] s.add(-l[j][1]) if count < k - t: dat.append(-1) continue else: for j in range(i-1): if j in s: dat[j] = 0 else: if dat[j] >= 0: dat[j] += 1 count -= 1 else: dat[j] = 0 dat.append(count) print(*dat[::-1])