#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<int, pair<double, int> > > q;
pair<int, pair<double, int> > p;
vector<int> v;
int main() {
  int a, b, c, d, e, x, y, n, m;
  double z;
  cin >> n >> m;
  z = (m * 1.00 + 1.00) / (2 * 1.00);
  for (a = 1; a <= m; a++) {
    p.first = 0;
    p.second.first = a * 1.00 - z;
    if (p.second.first > 0) p.second.first = -1 * p.second.first;
    p.second.second = -1 * a;
    q.push(p);
  }
  for (a = 1; a <= n; a++) {
    p = q.top();
    q.pop();
    b = p.first * -1;
    v.push_back(p.second.second * -1);
    b++;
    p.first = b * -1;
    q.push(p);
  }
  for (a = 0; a < v.size(); a++) cout << v[a] << endl;
  return 0;
}
