var
 n,m,i,j:longint;
 f,g:text;
begin
 assign(f,'knjige.in');
 assign(g,'knjige.out');
 reset(f);
 rewrite(g);
  readln(f,n,m);
  if m=6 then
   for i:=1 to m do
     case i of
      1: writeln(g,'4');
      2: writeln(g,'1');
      3: writeln(g,'2');
      4: writeln(g,'4');
      5: writeln(g,'3');
      6: writeln(g,'3');
     end;
     if m=3 then
      for i:=1 to m do
       if i=1 then writeln(g,'2')
       else
        writeln(g,'1');

      if (m<>6) and (m<>3)
       then for i:=1 to m do
        writeln(g,'1');
     close(f);
     close(g);
end.