#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <functional>

#define mp make_pair
#define pb push_back
#define mes(a,b) memset(a,b,sizeof(a))
#define mes0(a) memset(a,0,sizeof(a))
#define lson l,mid,pos<<1
#define rson mid+1,r,pos<<1|1
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define fi first
#define se second
#define sss(a) a::iterator
#define all(a) a.begin(),a.end()
#define READ_INTEGER \
{ \
    x=0;\
    int f=1;char ch=_getchar();\
    while((ch<'0'||ch>'9')&&~ch){if(ch=='-')f=-1;ch=_getchar();}\
    if (ch==-1)return -1;\
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=_getchar();}\
    x*=f;\
    return 1;\
}
#define READ_REAL \
{\
        char in;double Dec=0.1;\
        bool IsN=false,IsD=false;\
        in=_getchar();\
        if(in==EOF) return -1;\
        while(in!='-'&&in!='.'&&(in<'0'||in>'9'))\
                in=_getchar();\
        if(in=='-'){IsN=true;x=0;}\
        else if(in=='.'){IsD=true;x=0;}\
        else x=in-'0';\
        if(!IsD){\
                while(in=_getchar(),in>='0'&&in<='9'){\
                        x*=10;x+=in-'0';}\
        }\
        if(in!='.'){\
                if(IsN) x=-x;\
                return 1;\
        }else{\
                while(in=_getchar(),in>='0'&&in<='9'){\
                        x+=Dec*(in-'0');Dec*=0.1;\
                }\
        }\
        if(IsN) x=-x;\
        return 1;\
}
#define READ_STRING \
{\
    char *tmp=x;\
    char in=_getchar();\
    while(in<=' '&&in!=EOF)in=_getchar();\
    if (in==-1)return -1;\
    while (in>' ')*(tmp++)=in,in=_getchar();\
    *tmp='\0';\
    return 1;\
}
using namespace std;
typedef double DB;
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<long long ,int> pli;
typedef pair<int,long long > pil;
typedef pair<string,int> psi;
typedef pair<long long ,long long > pll;

const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const double pi = acos(-1.0);
const int maxn = 1000000+10;
const int mod = 1e9+7;

inline char _getchar()
{
    static const int BUFSIZE = 100001 ;
    static char  buf[BUFSIZE] ;
    static char  *psta=buf, *pend=buf ;
    if (psta >= pend){
        psta = buf;
        pend = buf + fread(buf,1,BUFSIZE,stdin);
        if (psta >= pend)
            return -1;
    }
    return *psta++;
}
inline int read(int &x) READ_INTEGER
inline int read(long long &x) READ_INTEGER
inline int read(double &x) READ_REAL
inline int read(float &x) READ_REAL
inline int read(char *x) READ_STRING
long long sz[maxn];
int main()
{
    int k,n;
    scanf("%d%d",&k,&n);
    sz[1]=1;
    int lim=1;
    for (int i=2;;i++){
        lim=i;
        sz[i]=sz[i-1]*k+1;
        if (sz[i]>1LL*n)break;
    }
    int now=n;
    if (k&1){
        int cnt=(n&1)^1;
        for (;now>lim;now--)printf("%d ",(k+1)/2),cnt++;
        for (;now>0;now--){
            int sub=cnt/sz[now];
            cnt=cnt%sz[now];
            int w=k-sub;
            if (cnt<0)w++;
            if ((w+1)/2==0)return 0;
            printf("%d ",(w+1)/2);
            if ((w)%2==0&&cnt>=0)cnt-=sz[now];
            else if (w%2==1&&cnt<0)cnt+=sz[now];
            cnt++;
        }
    }else {
        printf("%d",k/2);
        for (int i=1;i<n;i++)printf(" %d",k);
    }
    return 0;
}


Measured memory_bytes: 4608