#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, i, j = 1, k, ctr = 1;
  cin >> n >> m;
  if (m % 2 != 0) {
    k = m / 2 + 1;
    cout << k << "\n";
    for (i = 1; i < n;) {
      if (k - j != 0 && i < n) {
        cout << k - j << "\n";
        i++;
        if (k + j <= m && i < n) {
          cout << k + j << "\n";
          i++;
        }
      }
      if (k - j == 0 && i < n) {
        cout << k << "\n";
        j = 0;
        i++;
      }
      j++;
    }
  } else {
    k = m / 2;
    cout << k << "\n";
    for (i = 1; i < n;) {
      if (k + j <= m && i < n) {
        cout << k + j << "\n";
        i++;
        ctr++;
        if (k - j != 0 && i < n) {
          cout << k - j << "\n";
          i++;
        }
      }
      if (k - j == 0 && i < n) {
        cout << k << "\n";
        j = 0;
        i++;
      }
      j++;
    }
  }
  return 0;
}
