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 JAVA):

Solution:
/*
 ~/BAU/ACM-ICPC/Teams/Rampage/MMZA
 ~/sudo apt-get verdict Accepted
 practice...
*/
//package javaapplication1;

//import java.util.Scanner;


import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static final int Mod=(int)1e9+7;
    static final int N=(int)100+5;
    
    public static void main(String[] args) throws IOException {
       // Reader.init(System.in);
        //Scanner in=new Scanner(new FileInputStream("input.txt"));
        FastReader in=new FastReader();
        StringBuilder sb=new StringBuilder();
        //in=new FileReader("input.txt");
        //PrintWriter out=new PrintWriter(new FileOutputStream("output.txt"));
        PrintWriter out=new PrintWriter(System.out);           
        Main ob=new Main();
        int n=in.nextInt(),m=in.nextInt();
        int mid=(m+1)/2,l=mid,r=mid;
        if((1&m)!=1)r++;
        ArrayList<Integer> numbers=new ArrayList();
        while(l>=1||r<=m){
            if(l==r){
                numbers.add(l);
                l--;r++;
            }
            else {
                if(l>=1){
                    numbers.add(l);
                    l--;
                }
                if(r<=m){
                    numbers.add(r);
                    r++;
                }
            }
        }
        for(int i=1,j=0;i<=n;i++){
            sb.append(numbers.get(j)+"\n");
            j=(j+1)%m;
        }
        out.print(sb);
        
        
        
        
        
        
 
        out.close();
    }
    static int[] reverse(int [] arr){
        ArrayList<Integer> temp=new ArrayList();
        for(int i=0;i<arr.length;i++)
            temp.add(arr[i]);
        Collections.reverse(temp);
        for(int i=0;i<temp.size();i++)
            arr[i]=temp.get(i);
        return arr;
    }
    static String reverse(String s){
        String temp="";
        for(int i=s.length()-1;i>=0;i--)
            temp+=s.charAt(i);
        return temp;
    }
    static String sort(String inputString) 
    { 
        ArrayList<Character> arr=new ArrayList();
        for(int i=0;i<inputString.length();i++)
            arr.add(inputString.charAt(i));
        Collections.sort(arr);
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<arr.size();i++)
            sb.append(arr.get(i));
        
        return sb.toString(); 
    } 
     
    static boolean next_permutation(int[] p, int len) {
        int a = len - 2;
        while (a >= 0 && p[a] >= p[a + 1]) {
            a--;
        }

        if (a == -1) {
            return false;
        }

        int b = len - 1;
        while (p[b] <= p[a]) {
            b--;
        }

        p[a] += p[b];
        p[b] = p[a] - p[b];
        p[a] -= p[b];

        for (int i = a + 1, j = len - 1; i < j; i++, j--) {
            p[i] += p[j];
            p[j] = p[i] - p[j];
            p[i] -= p[j];
        }

        return true;
    }
    static int lower_bound(ArrayList<Integer> arr,int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp > 0) {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            } else {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            }
            mid = (lo + hi)/2;
        }
    }
    static int upper_bound(ArrayList<Integer> arr, int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp < 0) {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            } else {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            }
            mid = (lo + hi)/2;
        }
    }
    static int gcd(int a,int b){
        return b==0?a:gcd(b,a%b);
    } 
    static double dot(Point p,Point q){
        return (p.x*q.x+p.y*q.y);
    }
    static double cross(Point p,Point q){
        return (p.x*q.y-p.y*q.x);
    }
    static Point computeLineIntersection(Point a,Point b,Point c,Point d){
        b=b.sub(a);d=c.sub(d);c=c.sub(a);
        return a.add(b.mulCon(cross(c,d)).devideCon(cross(b,d)));
    }
   static class FastReader 
        { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
  
}
class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    static void init(InputStream input) throws UnsupportedEncodingException {
        reader = new BufferedReader(
                new InputStreamReader(input, "UTF-8"));
        tokenizer = new StringTokenizer("");
    }

    static void init(String url) throws FileNotFoundException {
        reader = new BufferedReader(new FileReader(url));
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine());
        }
        return tokenizer.nextToken();
    }

    static String nextLine() throws IOException {
        return reader.readLine();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
}
class Point{    
    double x,y;
    Point(double _x,double _y){
        x=_x;
        y=_y;
    }
    Point add(final Point p){
        return new Point(x+p.x,y+p.y);
    }
    Point sub(final Point p){
        return new Point(x-p.x,y-p.y);
    }
    Point mulCon(final double c){
        return new Point(c*x,c*y);
    }
    Point devideCon(final double c){
        return new Point(x/c,y/c);
    }
}
class  pair implements Comparator<pair>{
    int  first;
    int  second;
    //int third;
    pair(){}
    pair(int a,int s){
        first = a;
        second = s;
        //third=t;
    }
    
   /* pair(pair a,pair b){
        first = a;
        second = b;
    }*/
    @Override 
    public int compare(pair a,pair b){
        return (a.first-b.first);
    }
}