#yuki478 n,k=map(int,raw_input().split()) s=[1,3,2,4] t=[] m=n/4+1 for i in xrange(m): t=t+s[:] u=t[:n] if k==1: u[0]=2 else: for i in xrange(k): u[i]=1 for i in xrange(len(u)): print u[i], print