#include #define mp make_pair #define pb push_back #define REP(i,a,n) for(int i = a;i < (n);i++) #define rep(i,n) for(int i = 0;i < (n);i++) #define all(s) s.begin(), s.end() #define rall(s) s.rbegin(), s.rend() #define range(x,min,max) ((min) <= (x) && (x) <= (max)) #define xyrange(x, minX, maxX, y, minY, maxY) (range(x, minX, maxX) && range(y, minY, maxY)) using namespace std; typedef long long LL; typedef vector VI; typedef vector > VVI; typedef vector VS; typedef vector VB; typedef pair PII; typedef vector VPII; const int DX[]={1,0,-1,0},DY[]={0,-1,0,1}; const int INF = 0x3f3f3f3f; int n, k; VI solve() { int cnt = n - k - 2; VI res; int c = 0; rep (i, n) { if (i % 2) { res.pb(c + 1); } else { res.pb(c); c++; } } REP (i, cnt + 2, n) { res[i] = res[i - 1]; } return res; } int main(){ cin.tie(0); ios::sync_with_stdio(false); cin >> n >> k; VI ans = solve(); rep (i, ans.size()) { cout << ans[i] << (i == ans.size() - 1? "\n" : " "); } return 0; }