PolandBall has such a convex polygon with n veritces that no three of its diagonals intersect at the same point. PolandBall decided to improve it and draw some red segments. 

He chose a number k such that gcd(n, k) = 1. Vertices of the polygon are numbered from 1 to n in a clockwise way. PolandBall repeats the following process n times, starting from the vertex 1: 

Assume you've ended last operation in vertex x (consider x = 1 if it is the first operation). Draw a new segment from vertex x to k-th next vertex in clockwise direction. This is a vertex x + k or x + k - n depending on which of these is a valid index of polygon's vertex.

Your task is to calculate number of polygon's sections after each drawing. A section is a clear area inside the polygon bounded with drawn diagonals or the polygon's sides.

Input

There are only two numbers in the input: n and k (5 ≤ n ≤ 106, 2 ≤ k ≤ n - 2, gcd(n, k) = 1).

Output

You should print n values separated by spaces. The i-th value should represent number of polygon's sections after drawing first i lines.

Examples

Input

5 2


Output

2 3 5 8 11 

Input

10 3


Output

2 3 4 6 9 12 16 21 26 31 

Note

The greatest common divisor (gcd) of two integers a and b is the largest positive integer that divides both a and b without a remainder.

For the first sample testcase, you should output "2 3 5 8 11". Pictures below correspond to situations after drawing lines.

<image> <image> <image> <image> <image> <image>
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;
public class Main
{
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    static void init(InputStream input)
    {
        reader = new BufferedReader( new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
    static String next() throws IOException
    {
        while ( ! tokenizer.hasMoreTokens() )
        {
            tokenizer = new StringTokenizer(reader.readLine() );
        }
        return tokenizer.nextToken();
    }
 
    static long nextInt() throws IOException
    {
        return Long.parseLong( next() );
    }
    static PrintWriter writer;
    static void outit(OutputStream outputStream)
    {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }
    static void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }
 
    static void println(Object...objects) {
        print(objects);
        writer.println();
    }
 
    static void close() {
        writer.close();
    }
 
    static void flush() {
        writer.flush();
    }
    public static void main(String [] args) throws IOException
    {
        init(System.in) ;
        outit(System.out) ;
//    	int t = (int) nextInt() ;
//    	for(int i =0 ; i<t ; i++)
        output() ;
        flush();
        close();
    }
    public static int p(int i)
    {
    	return (int)Math.pow(2,i) ;
    }
    static int [][][] a ;
    static long  p ;
    static long [] tree ;
    static long [] x ;
    static long [] y ;
    static double pi = 3.14159 ;
    static double [] ang ;
    static char [][] board ;
    static boolean [][] spec ;
    static boolean [][] visited_a ;
    static boolean [][] visited_w ;
    static boolean check ;
    static double PI = 3.14159 ;
    public static final int MAXN = 1000 * 1001;
    static int n ;
    static int k ;
    static ArrayList<ArrayList<Integer>> ar ;
    static boolean [] visited ;
    public static void output() throws IOException
    {
    	n = (int)nextInt() ;
    	int k = (int)nextInt() ;
    	k = Math.min(k,n-k) ;
    	long [] BIT = new long[n+1] ;
    	Arrays.fill(BIT,0);
    	long ans = 1 ;
    	int start = 1 ;
    	int end = 1 ;
    	for(int i = 1 ; i<=n ; i++)
    	{
    		start = end ;
    		if(start+k>n)
    		{
    			end = start+k-n ;
    		}
    		else
    		{
    			end = start+k ;
    		}
    		updateBIT(BIT,start,1) ;
    		updateBIT(BIT,end,1) ;
    		int inter = split_q(BIT,start+1,end-1) ;
//    		println(start+" "+end) ;
//    		print_BIT(n,BIT) ;
//    		println("*"+inter) ;
    		ans+=inter+1 ;
    		print(ans+" ") ;
    	}
    	println() ;
    }
    static void print_BIT(int n,long [] BIT)
    {
    	for(int i = 1 ; i<=n ; i++)
    	{
    		print(query(BIT,i)-query(BIT,i-1)+" ") ;
    	}
    	println() ;
    }
    static int split_q(long [] BIT,int start, int end)
    {
    	if(start>end)
    	{
    		return q_u(BIT,start,n)+q_u(BIT,1,end) ;
    	}
    	else
    	{
    		return q_u(BIT,start,end) ;
    	}
    }
    static int q_u(long [] BIT,int x, int y)
    {
    	return query(BIT,y)-query(BIT,x-1) ;
    }
    static void updateBIT(long[] arr, int pos, int val) 
    {
        int len = arr.length;
        for (; pos < len; pos |= (pos + 1)) 
            arr[pos] += val;
    }
    static int query(long[] arr, int pos) 
    {
        int sum = 0;
        for (; pos >= 0; pos = (pos & (pos + 1)) - 1) 
            sum += arr[pos];
        return sum;
    }
} 