#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e8;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
const int N = 100;
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int ans = m / n;
  int modi = m % n;
  int start = m / 2 + m % 2;
  cout << start << endl;
  int range = 1;
  for (int i = 0; i < (int)(n - 1); ++i) {
    if (range == m)
      range = 0, start = m / 2 + m % 2;
    else if (start <= m / 2)
      start += range;
    else
      start -= range;
    range++;
    cout << start << endl;
  }
  return 0;
}
