a,b=map(int,input().split());c=[1,3,2,4]*99999 for i in range(a-b,a):c[i]=c[i-1] print(*c[:a])