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
import com.sun.org.apache.xerces.internal.util.SynchronizedSymbolTable;

import java.awt.*;
import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.util.List;

public class Newbie {

    static InputReader sc = new InputReader(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        solver s = new solver();
        int t = 1;
        while (t > 0) {
            s.solve();
            t--;
        }
    }

    static class descend implements Comparator<pair> {
        public int compare(pair o1, pair o2) {
            if (o1.a != o2.a) {
                return (int) (o1.a - o2.a) * -1;
            } else {
                return (o1.b - o2.b);
            }
        }
    }

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer token;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
            token = null;
        }

        public String next() {
            while (token == null || !token.hasMoreTokens()) {
                try {
                    token = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return token.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    static class card {
        long a;
        int cnt;
        int i;

        public card(long a, int cnt, int i) {
            this.a = a;
            this.cnt = cnt;
            this.i = i;
        }
    }

    static class ascend implements Comparator<pair> {
        public int compare(pair o1, pair o2) {
            if (o1.a != o2.a)
                return (int) (o1.a - o2.a);
            else
                return (int) (o1.b - o2.b) * -1;
        }
    }

    static class extra {

        static boolean v[] = new boolean[100001];
        static List<Integer> l = new ArrayList<>();
        static int t;

        static void shuffle(long a[]) {
            List<Long> l = new ArrayList<>();
            for (int i = 0; i < a.length; i++)
                l.add(a[i]);
            Collections.shuffle(l);
            for (int i = 0; i < a.length; i++)
                a[i] = l.get(i);
        }

        static long gcd(long a, long b) {
            if (b == 0)
                return a;
            else
                return gcd(b, a % b);
        }

        static boolean valid(int i, int j, int r, int c) {
            if (i >= 0 && i < r && j >= 0 && j < c)
                return true;
            else
                return false;
        }

        static void seive() {
            for (int i = 2; i < 100001; i++) {
                if (!v[i]) {
                    t++;
                    l.add(i);
                    for (int j = 2 * i; j < 100001; j += i)
                        v[j] = true;
                }
            }
        }

        static int binary(int a[], int val, int n) {
            int mid = 0, l = 0, r = n - 1, ans = 0;
            while (l <= r) {
                mid = (l + r) >> 1;
                if (a[mid] == val) {
                    r = mid - 1;
                    ans = mid;
                } else if (a[mid] > val)
                    r = mid - 1;
                else {
                    l = mid + 1;
                    ans = l;
                }
            }
            return (ans);
        }

        static long fastexpo(int x, int y) {
            long res = 1;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res *= x;
                }
                y = y >> 1;
                x = x * x;
            }
            return res;
        }

        static long lfastexpo(int x, int y, int p) {
            long res = 1;
            x = x % p;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res = (res * x) % p;
                }
                y = y >> 1;
                x = (x * x) % p;
            }
            return res;
        }
    }

    static class pair {
        long a;
        int b;

        public pair(long a, int n) {
            this.a = a;
            this.b = n;
        }
    }

    static long m = (long) 1e9 + 7;

    static class solver {
        void solve() {
            int n = sc.nextInt();
            int n1 = n;
            int m = sc.nextInt();
            List<Integer> l = new ArrayList<>();
            int mid = (m + 1) / 2;
            int left = 0, right = 0;
            if (m % 2 == 0) {
                l.add(mid);
                n1--;
                if (n1 > 0) {
                    l.add(mid + 1);
                    n1--;
                }
                left = mid - 1;
                right = mid + 2;
            } else {
                l.add(mid);
                n1--;
                left = mid - 1;
                right = mid + 1;
            }
            while (n1 > 0 && (left > 0 || right < m + 1)) {
                if (left > 0) {
                    l.add(left);
                    left--;
                    n1--;
                }
                if (n1 > 0) {
                    l.add(right);
                    right++;
                    n1--;
                }
            }
            l.forEach(System.out::println);
            if (n1 > 0) {
                for (int i = 0; i < n1; i++)
                    System.out.println(l.get(i % m));
            }
        }
    }
}