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