#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, m;
  cin >> x >> y;
  m = (y + 1) / 2;
  cout << m << endl;
  for (int i = 1; i < x; i++) {
    if (m == y) {
      m = (y + 1) / 2;
    } else if (m <= y / 2) {
      m = y + 1 - m;
    } else {
      m = y - m;
    }
    cout << m << endl;
  }
  return 0;
  return 0;
}
