Problem: After a team finished their training session on Euro football championship, Valeric was commissioned to gather the balls and sort them into baskets. Overall the stadium has n balls and m baskets. The baskets are positioned in a row from left to right and they are numbered with numbers from 1 to m, correspondingly. The balls are numbered with numbers from 1 to n.

Valeric decided to sort the balls in the order of increasing of their numbers by the following scheme. He will put each new ball in the basket with the least number of balls. And if he's got several variants, he chooses the basket which stands closer to the middle. That means that he chooses the basket for which <image> is minimum, where i is the number of the basket. If in this case Valeric still has multiple variants, he chooses the basket with the minimum number.

For every ball print the number of the basket where it will go according to Valeric's scheme.

Note that the balls are sorted into baskets in the order of increasing numbers, that is, the first ball goes first, then goes the second ball and so on.

Input

The first line contains two space-separated integers n, m (1 ≤ n, m ≤ 105) — the number of balls and baskets, correspondingly.

Output

Print n numbers, one per line. The i-th line must contain the number of the basket for the i-th ball.

Examples

Input

4 3


Output

2
1
3
2


Input

3 1


Output

1
1
1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long int n, q;
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long int powe(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a);
    }
    a = (a * a);
    b /= 2;
  }
  return res;
}
long long int power(long long int a, long long int b, long long int M) {
  a %= M;
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a) % M;
    }
    a = (a * a) % M;
    b /= 2;
  }
  return res;
}
long long int extendedEuclid(long long int A, long long int B, long long int &x,
                             long long int &y) {
  if (B == 0) {
    x = 1;
    y = 0;
    return A;
  } else {
    long long int x1, y1;
    long long int gcd = extendedEuclid(B, A % B, x1, y1);
    y = x1 - (A / B) * y1;
    x = y1;
    return gcd;
  }
}
long long int mi(long long int A, long long int M) {
  long long int x, y;
  extendedEuclid(A, M, x, y);
  if (x < 0) {
    x += 1000000007;
  }
  return x;
}
template <typename T>
void read(T &x) {
  cin >> x;
}
template <typename T, typename T0>
void read(T &x, T0 &y) {
  cin >> x >> y;
}
template <typename T, typename T0, typename T1>
void read(T &x, T0 &y, T1 &z) {
  cin >> x >> y >> z;
}
template <typename T, typename T0, typename T1, typename T2>
void read(T &x, T0 &y, T1 &z, T2 &w) {
  cin >> x >> y >> z >> w;
}
template <typename T, typename T0>
void read(pair<T, T0> &p) {
  cin >> p.first >> p.second;
}
template <typename T, typename T0>
void write(pair<T, T0> &p) {
  write(p.first);
  write(p.second);
}
template <typename T>
void read(vector<T> &oneD, long long int n) {
  for (long long int i = 0; i < n; i++) {
    long long int x;
    read(x);
    oneD.push_back(x);
  }
}
template <typename T>
void read(T oneD[], long long int n) {
  for (long long int i = 0; i < n; i++) {
    read(oneD[i]);
  }
}
template <typename T>
void write(T oneD[], int n) {
  for (long long int i = 0; i < n; i++) {
    write(oneD[i]);
  }
  cout << endl;
}
vector<bool> sieve(1000000, true);
void Sieve() {
  sieve[0] = false;
  sieve[1] = false;
  for (long long int i = 2; i * i <= 1000000; i++) {
    if (sieve[i] == true) {
      for (long long int j = i * i; j < 1000000; j += i) sieve[j] = false;
    }
  }
}
vector<long long int> sieve_spf;
void Sieve_spf() {
  const long long int n = 1e6 + 5;
  sieve_spf.resize(n);
  for (long long int i = 0; i < n; i++) sieve_spf[i] = i;
  sieve_spf[0] = -1;
  sieve_spf[1] = 1;
  for (long long int i = 2; i <= n; i += 2) sieve_spf[i] = 2;
  for (long long int i = 3; i <= n; i += 2)
    if (sieve_spf[i] == i)
      for (long long int j = i * i; j <= n; j += i)
        if (sieve_spf[j] == j) sieve_spf[j] = i;
}
bool oppositeSigns(long long int x, long long int y) { return ((x ^ y) < 0); }
int mpt(long long int n) {
  long long int c = 0;
  long long int n1 = pow(2, c);
  while (n1 < n) {
    c++;
    n1 = pow(2, c);
  }
  return c;
}
void the_happiest_place_on_earth() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int m;
  read(n, m);
  vector<long long int> v;
  long long int n1 = (m + 1) / 2;
  v.push_back(n1);
  if (m & 1) {
    for (long long int i = 1; i <= (m - 1) / 2; i++) {
      v.push_back(n1 - i);
      v.push_back(n1 + i);
    }
  } else {
    for (long long int i = 1; i <= (m - 1) / 2; i++) {
      v.push_back(n1 + i);
      v.push_back(n1 - i);
    }
  }
  if (m % 2 == 0) v.push_back(m);
  n1 = v.size();
  long long int n2 = n / v.size();
  n1 = n % n1;
  for (long long int j = 0; j < n2; j++) {
    for (long long int i = 0; i < v.size(); i++) cout << v[i] << "\n";
  }
  for (long long int i = 0; i < n1; i++) cout << v[i] << "\n";
}