#include using namespace std; template T gcd(T x, T y) { if (y == 0) return x; return gcd(y, x % y); } template T lcm(T x, T y) { if (x == 0 || y == 0) return 0; return x / gcd(x, y) * y; } int ctoi(char c) { if (c >= '0' && c <= '9') { return c - '0'; } return 0; } vector p; vector r; void init(int n) { p.reserve(n); r.reserve(n); for (int i = 0; i < n; i++) { p[i] = i; r[i] = 0; } } int root(int x) { return p[x] == x ? x : p[x] = root(p[x]); } bool same(int x, int y) { return root(x) == root(y); } void unite(int x, int y) { x = root(x); y = root(y); if (x == y) return; if (r[x] < r[y]) p[x] = y; else { p[y] = x; if (r[x] == r[y]) r[x]++; } } int main() { int n, k; cin >> n >> k; vector d(n, 1000000000 / 2); int cnt = 0; if (n - k - 2 < 2) d[0] -= 2; for (int i = 0; i < n - 2; i++) { if (cnt == n - k - 2) break; if (cnt % 2 == 0) { d[i + 2] = d[i] - 1; } else { d[i + 2] = d[i] + 1; } cnt++; } for (int i = 0; i < n; i++) { if (i != 0) cout << ' '; cout << d[i]; } cout << endl; }