#include <bits/stdc++.h>
using namespace std;
vector<int> ad[1000005];
int main() {
  long long n, m;
  cin >> n >> m;
  int ct = 0;
  int i = 1;
  int mid = (m + 1) / 2;
  int mid2 = mid;
  if (m % 2 == 0) mid2++;
  while (i <= n) {
    cout << mid << endl;
    i++;
    if (mid2 != mid && i <= n) {
      cout << mid2 << endl;
      i++;
    }
    int j = mid - 1;
    int k = mid2 + 1;
    for (i; i <= n; i++) {
      if (j > 0) {
        cout << j << endl;
        j--;
        i++;
        if (i <= n) {
          cout << k << endl;
          k++;
        }
      } else
        break;
    }
  }
  return 0;
}
