#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  vector<long long int> v;
  long long int s = (m + 1) / 2;
  v.push_back(s);
  long long int i = 1;
  if (m % 2) {
    while (1) {
      if (s + i == m + 1) break;
      if (s - i > 0) v.push_back(s - i);
      v.push_back(s + i);
      i++;
    }
  } else {
    while (1) {
      if (s + i == m + 1) break;
      v.push_back(s + i);
      if (s - i > 0) v.push_back(s - i);
      i++;
    }
  }
  i = 0;
  while (i < n) {
    cout << v[i] << "\n";
    v.push_back(v[i]);
    i++;
  }
  return 0;
}
