import java.io.*;
import java.util.List;
import java.util.StringTokenizer;

public class Q4 {
    public static MyScanner in = new MyScanner();
    public static PrintWriter out = in.MyOut();
    public static MyViewer view = new MyViewer();
//    public static Reader inRead = new Reader();

    static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

        int[] arrayInt(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            return a;
        }

        long[] arrayLong(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextLong();
            }
            return a;
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        static PrintWriter MyOut() {
            return new PrintWriter(new BufferedOutputStream(System.out), true);
        }
    }

    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        public int[] arrayInt(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            return a;
        }

        public long[] arrayLong(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextLong();
            }
            return a;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }

    static class MyViewer {
        static boolean print = true;

        public void on() {
            print = true;
        }

        public void off() {
            print = false;
        }

        public <T extends List> void list(T a) {
            if (!print) return;
            out.print("List: [" + a.get(0));
            for (int i = 1; i < a.size(); i++) {
                out.print(", " + a.get(i));
            }
            out.println("] Len: " + a.size());
        }

        public <T> void array(T[] a) {
            if (!print) return;
            out.print("Array: [" + a[0]);
            for (int i = 1; i < a.length; i++) {
                out.print(", " + a[i]);
            }
            out.println("] Len: " + a.length);
        }

        public void array(int[] a) {
            if (!print) return;
            out.print("int Array: [");
            for (int x : a) {
                out.print(x + ", ");
            }
            out.println("] Len: " + a.length);
        }

        public void array(long[] a) {
            if (!print) return;
            out.print("long Array: [");
            for (long x : a) {
                out.print(x + ", ");
            }
            out.println("] Len: " + a.length);
        }

        public void matrix(int[][] a, int cutoff) {
            if (cutoff == 0)
                cutoff = Integer.MAX_VALUE;
            for (int i = 0; i < a.length; i++) {
                if (i < cutoff) {
                    printMatrixRow(a[i], cutoff);
                } else {
                    out.println("     ...");
                    printMatrixRow(a[a.length - 1], cutoff);
                    break;
                }
            }
        }

        public void matrix(boolean[][] a, int cutoff) {
            if (cutoff == 0)
                cutoff = Integer.MAX_VALUE;
            for (int i = 0; i < a.length; i++) {
                if (i < cutoff) {
                    printMatrixRow(a[i], cutoff);
                } else {
                    out.println("     ...");
                    printMatrixRow(a[a.length - 1], cutoff);
                    break;
                }
            }
        }

        private void printMatrixRow(int[] a, int cutoff) {
            for (int j = 0; j < a.length; j++) {
                if (j < cutoff) {
                    out.printf("%6d  ", a[j]);
                } else {
                    out.printf(" ... %6d", a[a.length - 1]);
                    break;
                }
            }
            out.println();
        }

        private void printMatrixRow(boolean[] a, int cutoff) {
            for (int j = 0; j < a.length; j++) {
                if (j < cutoff) {
                    out.print(a[j] ? "T " : "F ");
                } else {
                    out.print(" ... " + (a[a.length - 1] ? "T" : "F"));
                    break;
                }
            }
            out.println();
        }
    }

    public static void main(String[] args) throws IOException {

        int n = in.nextInt();
        int k = in.nextInt();
        if( k > (n)/ 2)
            k = n - k;

        long inc = 1;
        long d = 2;
        int pos = 1;
        boolean addOne = false;
        for (int i = 0; i < n; i++) {

            if (i == n - 1)
                d--;
            out.print(d + " ");
            if (addOne) {
                inc++;
                addOne = false;
            }
            pos = pos + k;
            if (pos >= n) {
                inc++;
                pos = pos % n + 1;
                addOne = true;
            }

            d = d + inc;
        }
        out.println();
        in.close();
    }
}


import java.io.*;
import java.util.List;
import java.util.StringTokenizer;

public class Q4 {
    public static MyScanner in = new MyScanner();
    public static PrintWriter out = in.MyOut();
    public static MyViewer view = new MyViewer();
//    public static Reader inRead = new Reader();

    static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

        int[] arrayInt(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            return a;
        }

        long[] arrayLong(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextLong();
            }
            return a;
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        static PrintWriter MyOut() {
            return new PrintWriter(new BufferedOutputStream(System.out), true);
        }
    }

    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        public int[] arrayInt(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            return a;
        }

        public long[] arrayLong(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextLong();
            }
            return a;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }

    static class MyViewer {
        static boolean print = true;

        public void on() {
            print = true;
        }

        public void off() {
            print = false;
        }

        public <T extends List> void list(T a) {
            if (!print) return;
            out.print("List: [" + a.get(0));
            for (int i = 1; i < a.size(); i++) {
                out.print(", " + a.get(i));
            }
            out.println("] Len: " + a.size());
        }

        public <T> void array(T[] a) {
            if (!print) return;
            out.print("Array: [" + a[0]);
            for (int i = 1; i < a.length; i++) {
                out.print(", " + a[i]);
            }
            out.println("] Len: " + a.length);
        }

        public void array(int[] a) {
            if (!print) return;
            out.print("int Array: [");
            for (int x : a) {
                out.print(x + ", ");
            }
            out.println("] Len: " + a.length);
        }

        public void array(long[] a) {
            if (!print) return;
            out.print("long Array: [");
            for (long x : a) {
                out.print(x + ", ");
            }
            out.println("] Len: " + a.length);
        }

        public void matrix(int[][] a, int cutoff) {
            if (cutoff == 0)
                cutoff = Integer.MAX_VALUE;
            for (int i = 0; i < a.length; i++) {
                if (i < cutoff) {
                    printMatrixRow(a[i], cutoff);
                } else {
                    out.println("     ...");
                    printMatrixRow(a[a.length - 1], cutoff);
                    break;
                }
            }
        }

        public void matrix(boolean[][] a, int cutoff) {
            if (cutoff == 0)
                cutoff = Integer.MAX_VALUE;
            for (int i = 0; i < a.length; i++) {
                if (i < cutoff) {
                    printMatrixRow(a[i], cutoff);
                } else {
                    out.println("     ...");
                    printMatrixRow(a[a.length - 1], cutoff);
                    break;
                }
            }
        }

        private void printMatrixRow(int[] a, int cutoff) {
            for (int j = 0; j < a.length; j++) {
                if (j < cutoff) {
                    out.printf("%6d  ", a[j]);
                } else {
                    out.printf(" ... %6d", a[a.length - 1]);
                    break;
                }
            }
            out.println();
        }

        private void printMatrixRow(boolean[] a, int cutoff) {
            for (int j = 0; j < a.length; j++) {
                if (j < cutoff) {
                    out.print(a[j] ? "T " : "F ");
                } else {
                    out.print(" ... " + (a[a.length - 1] ? "T" : "F"));
                    break;
                }
            }
            out.println();
        }
    }

    public static void main(String[] args) throws IOException {

        int n = in.nextInt();
        int k = in.nextInt();
        if( k > (n)/ 2)
            k = n - k;

        long inc = 1;
        long d = 1;
        int pos = 0;
        boolean addOne = false;
        for (int i = 0; i < n; i++) {
//            if (i == n - 1)
//                d--;
            pos = pos + k;
            if (pos > n) {
                inc++;
                pos = pos % n ;
                addOne = true;
            }
            d = d + inc;

            out.print( d + " ");
            if (addOne) {
                inc++;
                addOne = false;
            }

        }
        out.println();
        in.close();
    }
}


/*
Keep solving problems.
*/

import java.util.*;
import java.io.*;

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static long MOD = 1000L * 1000L * 1000L + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    long arr[];
    long tree[];
    int k;
    int n;

    /**
     * Increment elements at queryIndex with value
     */
    void update_tree(int node, int nodeStartIndex, int nodeEndIndex, int queryIndex, int value) {
        if(nodeStartIndex > nodeEndIndex || nodeStartIndex > queryIndex || nodeEndIndex < queryIndex) // Current segment is not within range [i, j]
            return;
        if(nodeStartIndex == nodeEndIndex) { // Segment is fully within range
            tree[node] += value;
            return;
        }

        update_tree(node * 2, nodeStartIndex, (nodeStartIndex + nodeEndIndex) / 2, queryIndex, value); // Updating left child
        update_tree(node * 2 + 1, 1 + (nodeStartIndex + nodeEndIndex) / 2, nodeEndIndex, queryIndex, value); // Updating right child

        tree[node] = tree[node * 2] + tree[node * 2 + 1]; // Updating root
    }

    /**
     * Query tree to get max element value within range [queryStartIndex, queryEndIndex]
     */
    long query_tree(int node, int nodeStartIndex, int nodeEndIndex, int queryStartIndex, int queryEndIndex) {
        if(nodeStartIndex > nodeEndIndex || nodeStartIndex > queryEndIndex || nodeEndIndex < queryStartIndex) {
            return 0; // Out of range!!! change if necessary
        }

        if(nodeStartIndex >= queryStartIndex && nodeEndIndex <= queryEndIndex) {// Current segment is totally within range [i, j]
            return tree[node];
        }

        long q1 = query_tree(node * 2, nodeStartIndex, (nodeStartIndex + nodeEndIndex) / 2, queryStartIndex, queryEndIndex); // Query left child
        long q2 = query_tree(1 + node * 2, 1 + (nodeStartIndex + nodeEndIndex) / 2, nodeEndIndex, queryStartIndex, queryEndIndex); // Query right child

        return q1 + q2;
    }
    void solve() throws IOException {
        n = nextInt();
        k = nextInt();
        arr = new long[n];
        tree = new long[5 * arr.length];
        long res = 1;
        int start = 0;
        for (int i = 0; i < n; i++) {
            int end = (start + k - 1) % n;
            res += query_tree_range((start + 1) % n, end) + 1;
            update_tree(1, 0, n - 1, start, 1);
            start = (end + 1) % n;
            update_tree(1, 0, n - 1, start, 1);
            out(res + " ");
        }
    }

    long query_tree_range(int start, int end) {
        if (start <= end) {
            return query_tree(1, 0, n - 1, start, end);
        }
        else {
            return query_tree(1, 0, n - 1, start, n - 1) + query_tree(1, 0, n - 1, 0, end);
        }
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    long gcd(long a, long b) {
        while(a != 0 && b != 0) {
            long c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        outln(String.format("%.9f%n", val));
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}


import java.io.*;
import java.util.*;

public class CFD {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000L * 1000L * 1000L + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    long arr[];
    long tree[];
    int k;
    int n;

    /**
     * Increment elements at queryIndex with value
     */
    void update_tree(int node, int nodeStartIndex, int nodeEndIndex, int queryIndex, int value) {
        if(nodeStartIndex > nodeEndIndex || nodeStartIndex > queryIndex || nodeEndIndex < queryIndex) // Current segment is not within range [i, j]
            return;
        if(nodeStartIndex == nodeEndIndex) { // Segment is fully within range
            tree[node] += value;
            return;
        }

        update_tree(node * 2, nodeStartIndex, (nodeStartIndex + nodeEndIndex) / 2, queryIndex, value); // Updating left child
        update_tree(node * 2 + 1, 1 + (nodeStartIndex + nodeEndIndex) / 2, nodeEndIndex, queryIndex, value); // Updating right child

        tree[node] = tree[node * 2] + tree[node * 2 + 1]; // Updating root
    }

    /**
     * Query tree to get max element value within range [queryStartIndex, queryEndIndex]
     */
    long query_tree(int node, int nodeStartIndex, int nodeEndIndex, int queryStartIndex, int queryEndIndex) {
        if(nodeStartIndex > nodeEndIndex || nodeStartIndex > queryEndIndex || nodeEndIndex < queryStartIndex) {
            return 0; // Out of range!!! change if necessary
        }

        if(nodeStartIndex >= queryStartIndex && nodeEndIndex <= queryEndIndex) {// Current segment is totally within range [i, j]
            return tree[node];
        }

        long q1 = query_tree(node * 2, nodeStartIndex, (nodeStartIndex + nodeEndIndex) / 2, queryStartIndex, queryEndIndex); // Query left child
        long q2 = query_tree(1 + node * 2, 1 + (nodeStartIndex + nodeEndIndex) / 2, nodeEndIndex, queryStartIndex, queryEndIndex); // Query right child

        return q1 + q2;
    }
    void solve() throws IOException {
        n = nextInt();
        k = nextInt();
        arr = new long[n];
        tree = new long[5 * arr.length];
        long res = 1;
        int start = 0;
        for (int i = 0; i < n; i++) {
            int end = (start + k) % n;
            res += query_tree_range(start, end) + 1;
            update_tree(1, 0, n - 1, start, 1);
            start = end;
            update_tree(1, 0, n - 1, start, 1);
            out(res + " ");
        }
    }

    long query_tree_range(int start, int end) {
        //[start + 1, end - 1]
        //[end + 1, start - 1]
        long r1 = helper((start + 1) % n, (end + n - 1) % n);
        long r2 = helper((end + 1) % n, (start + n - 1) % n);
        return Math.min(r1, r2);
    }

    long helper(int start, int end) {
        if (start <= end) {
            return query_tree(1, 0, n - 1, start, end);
        }
        else {
            return query_tree(1, 0, n - 1, start, n - 1) + query_tree(1, 0, n - 1, 0, end);
        }
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    int gcd(int a, int b) {
        while(a != 0 && b != 0) {
            int c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        outln(String.format("%.9f%n", val));
    }
    public CFD() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFD();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}


import java.io.*;
import java.util.*;

public class B implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() {
        return Integer.parseInt(readString());
    }

    long readLong() {
        return Long.parseLong(readString());
    }

    double readDouble() {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new _Solution(), "", 128 * (1L << 20)).start();
        new B().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    int sum(int r) {
        int result = 0;
        for (; r >= 0; r = (r & (r + 1)) - 1)
            result += t[r];
        return result;
    }

    void inc(int i, int delta) {
        for (; i < n; i = (i | (i + 1)))
            t[i] += delta;
    }

    int sum(int l, int r) {
        if (r >= n) {
            return sum(l, n - 1) + sum(0, r % n);
        }
        return sum(r) - sum(l - 1);
    }

    int n;
    int[] t;

    private void solve() {
        n = readInt();
        int k = readInt();
        t = new int[n];
        int start = 0;
        long cur = 1;
        if (k > n / 2) {
            k = n - k;
        }
        for (int i = 0; i < n; i++) {
            cur += sum(start + 1, start + k - 1) + 1;
            out.print(cur + " ");
            inc(start, 1);
            start = (start + k) % n;
            inc(start, 1);
        }
    }
}


/*
 * Code Author: Akshay Miterani
 * DA-IICT
 */
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

	InputReader in;
	PrintWriter out;
	Main() throws IOException {
		in = new InputReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	public static void main(String args[]) {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}, "1", 1 << 26).start();
	}

	//--------------------My Code Starts Here----------------------
	long mod=(long)1e9+7;
	public void solve() throws IOException{
		int n=in.nextInt();
		int k=in.nextInt();
		int tree[]=new int[n];
		int cur=0;
		if(k*2>n){
			k=n-k;
		}
		long ans[]=new long[n+1];
		ans[0]=1;
		for(int i=0;i<n;i++){
			int sum=1;
			int low=cur%n;
			int high=(cur+k)%n;
			if(high>low){
				sum+=sum(tree, high-1)-sum(tree, low);
			}
			else{
				sum+=sum(tree, n-1)-sum(tree, low);
				sum+=sum(tree, high-1);
			}
			add(tree, low, 1);
			add(tree, high, 1);
			cur=(cur+k)%n;
			ans[i+1]=ans[i]+sum;
		}
		for(int i=0;i<n;i++){
			out.print(ans[i+1]+" ");
		}
		out.println();
	}
	//---------------------My Code Ends Here------------------------
	// T[i] += value
	  public static void add(int[] t, int i, int value) {
	    for (; i < t.length; i |= i + 1)
	      t[i] += value;
	  }

	  // sum[0..i]
	  public static int sum(int[] t, int i) {
	    int res = 0;
	    for (; i >= 0; i = (i & (i + 1)) - 1)
	      res += t[i];
	    return res;
	  }
	static long modulo(long a,long b,long c) {
		long x=1;
		long y=a;
		while(b > 0){
			if(b%2 == 1){
				x=(x*y)%c;
			}
			y = (y*y)%c; // squaring the base
			b /= 2;
		}
		return  x%c;
	}
	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		Pair(int xx,int yy){
			x=xx;
			y=yy;
		}
		@Override
		public int compareTo(Pair o) {
			if(Long.compare(this.x, o.x)!=0)
				return Long.compare(this.x, o.x);
			else
				return Long.compare(this.y, o.y);
		}
	}
	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	static final class InputReader{
		private final InputStream stream;
		private final byte[] buf=new byte[1024];
		private int curChar;
		private int numChars;
		public InputReader(InputStream stream){this.stream=stream;}
		private int read()throws IOException{
			if(curChar>=numChars){
				curChar=0;
				numChars=stream.read(buf);
				if(numChars<=0)
					return -1;
			}
			return buf[curChar++];
		}
		public final int nextInt()throws IOException{return (int)nextLong();}
		public final long nextLong()throws IOException{
			int c=read();
			while(isSpaceChar(c)){
				c=read();
				if(c==-1) throw new IOException();
			}
			boolean negative=false;
			if(c=='-'){
				negative=true;
				c=read();
			}
			long res=0;
			do{
				if(c<'0'||c>'9')throw new InputMismatchException();
				res*=10;
				res+=(c-'0');
				c=read();
			}while(!isSpaceChar(c));
			return negative?(-res):(res);
		}
		public final int[] readIntBrray(int size)throws IOException{
			int[] arr=new int[size];
			for(int i=0;i<size;i++)arr[i]=nextInt();
			return arr;
		}
		public final String next()throws IOException{
			int c=read();
			while(isSpaceChar(c))c=read();
			StringBuilder res=new StringBuilder();
			do{
				res.append((char)c);
				c=read();
			}while(!isSpaceChar(c));
			return res.toString();
		}
		public final String nextLine()throws IOException{
			int c=read();
			while(isSpaceChar(c))c=read();
			StringBuilder res=new StringBuilder();
			do{
				res.append((char)c);
				c=read();
			}while(c!='\n'&&c!=-1);
			return res.toString();
		}
		private boolean isSpaceChar(int c){
			return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
		}
	}
}


/*
 * Code Author: Akshay Miterani
 * DA-IICT
 */
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

	InputReader in;
	PrintWriter out;
	Main() throws IOException {
		in = new InputReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	public static void main(String args[]) {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}, "1", 1 << 26).start();
	}

	//--------------------My Code Starts Here----------------------
	long mod=(long)1e9+7;
	public void solve() throws IOException{
		int n=in.nextInt();
		int k=in.nextInt();
		int tree[]=new int[n];
		int cur=0;
		long ans[]=new long[n+1];
		ans[0]=1;
		for(int i=0;i<n;i++){
			int sum=1;
			int low=cur%n;
			int high=(cur+k)%n;
			if(high>low){
				sum+=sum(tree, high-1)-sum(tree, low);
			}
			else{
				sum+=sum(tree, n-1)-sum(tree, low);
				sum+=sum(tree, high-1);
			}
			add(tree, low, 1);
			add(tree, high, 1);
			cur=(cur+k)%n;
			ans[i+1]=ans[i]+sum;
		}
		for(int i=0;i<n;i++){
			out.print(ans[i+1]+" ");
		}
		out.println();
	}
	//---------------------My Code Ends Here------------------------
	// T[i] += value
	  public static void add(int[] t, int i, int value) {
	    for (; i < t.length; i |= i + 1)
	      t[i] += value;
	  }

	  // sum[0..i]
	  public static int sum(int[] t, int i) {
	    int res = 0;
	    for (; i >= 0; i = (i & (i + 1)) - 1)
	      res += t[i];
	    return res;
	  }
	static long modulo(long a,long b,long c) {
		long x=1;
		long y=a;
		while(b > 0){
			if(b%2 == 1){
				x=(x*y)%c;
			}
			y = (y*y)%c; // squaring the base
			b /= 2;
		}
		return  x%c;
	}
	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		Pair(int xx,int yy){
			x=xx;
			y=yy;
		}
		@Override
		public int compareTo(Pair o) {
			if(Long.compare(this.x, o.x)!=0)
				return Long.compare(this.x, o.x);
			else
				return Long.compare(this.y, o.y);
		}
	}
	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	static final class InputReader{
		private final InputStream stream;
		private final byte[] buf=new byte[1024];
		private int curChar;
		private int numChars;
		public InputReader(InputStream stream){this.stream=stream;}
		private int read()throws IOException{
			if(curChar>=numChars){
				curChar=0;
				numChars=stream.read(buf);
				if(numChars<=0)
					return -1;
			}
			return buf[curChar++];
		}
		public final int nextInt()throws IOException{return (int)nextLong();}
		public final long nextLong()throws IOException{
			int c=read();
			while(isSpaceChar(c)){
				c=read();
				if(c==-1) throw new IOException();
			}
			boolean negative=false;
			if(c=='-'){
				negative=true;
				c=read();
			}
			long res=0;
			do{
				if(c<'0'||c>'9')throw new InputMismatchException();
				res*=10;
				res+=(c-'0');
				c=read();
			}while(!isSpaceChar(c));
			return negative?(-res):(res);
		}
		public final int[] readIntBrray(int size)throws IOException{
			int[] arr=new int[size];
			for(int i=0;i<size;i++)arr[i]=nextInt();
			return arr;
		}
		public final String next()throws IOException{
			int c=read();
			while(isSpaceChar(c))c=read();
			StringBuilder res=new StringBuilder();
			do{
				res.append((char)c);
				c=read();
			}while(!isSpaceChar(c));
			return res.toString();
		}
		public final String nextLine()throws IOException{
			int c=read();
			while(isSpaceChar(c))c=read();
			StringBuilder res=new StringBuilder();
			do{
				res.append((char)c);
				c=read();
			}while(c!='\n'&&c!=-1);
			return res.toString();
		}
		private boolean isSpaceChar(int c){
			return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class RD {

    public static void main(String[] args) throws IOException {
	MyScanner sc = new MyScanner(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = sc.nextInt(), k = sc.nextInt();
	long ans = 1;
	for (int vertex = 1, clock = 1;;) {
	    vertex = vertex + k;
	    if (vertex > n) {
		clock++;
		vertex %= n;
	    }
	    ans -= clock;
	    ans += (clock << 1);
	    if (vertex != 1) {
		out.print(ans);
		out.print(" ");
	    }
	    if (vertex == 1){
		out.println(ans - 1);
		break;
	    }
	    if ((clock & 1) == 0)
		clock++;
	}
	out.flush();
	out.close();
    }

    static class MyScanner {

	BufferedReader br;
	StringTokenizer st;

	MyScanner(InputStream is) {
	    br = new BufferedReader(new InputStreamReader(is));
	}

	String next() throws IOException {
	    while (st == null || !st.hasMoreTokens())
		st = new StringTokenizer(br.readLine());
	    return st.nextToken();
	}

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

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

	boolean ready() throws IOException {
	    return br.ready();
	}
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class RD {

    public static void main(String[] args) throws IOException {
	MyScanner sc = new MyScanner(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = sc.nextInt(), k = sc.nextInt();
	if (k > n / 2)
	    k = n - k;
	long ans = 1;
	for (int vertex = 1, clock = 1;;) {
	    vertex = vertex + k;
	    if (vertex > n) {
		clock++;
		vertex %= n;
	    }
	    ans -= clock;
	    ans += (clock << 1);
	    if (vertex != 1) {
		out.print(ans);
		out.print(" ");
	    }
	    if (vertex == 1) {
		out.println(ans - 1);
		break;
	    }
	    if ((clock & 1) == 0)
		clock++;
	}
	out.flush();
	out.close();
    }

    static class MyScanner {

	BufferedReader br;
	StringTokenizer st;

	MyScanner(InputStream is) {
	    br = new BufferedReader(new InputStreamReader(is));
	}

	String next() throws IOException {
	    while (st == null || !st.hasMoreTokens())
		st = new StringTokenizer(br.readLine());
	    return st.nextToken();
	}

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

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

	boolean ready() throws IOException {
	    return br.ready();
	}
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class RD {

    public static void main(String[] args) throws IOException {
	MyScanner sc = new MyScanner(System.in);
	PrintWriter out = new PrintWriter("out.txt");
	int n = sc.nextInt(), k = sc.nextInt();
	long ans = 1;
	for (int vertex = 1, clock = 1;;) {
	    vertex = vertex + k;
	    if (vertex > n) {
		clock++;
		vertex %= n;
	    }
	    ans -= clock;
	    ans += (clock << 1);
	    if (vertex != 1) {
		out.print(ans);
		out.print(" ");
	    }
	    if (vertex == 1){
		out.println(ans - 1);
		break;
	    }
	    if ((clock & 1) == 0)
		clock++;
	}
	out.flush();
	out.close();
    }

    static class MyScanner {

	BufferedReader br;
	StringTokenizer st;

	MyScanner(InputStream is) {
	    br = new BufferedReader(new InputStreamReader(is));
	}

	String next() throws IOException {
	    while (st == null || !st.hasMoreTokens())
		st = new StringTokenizer(br.readLine());
	    return st.nextToken();
	}

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

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

	boolean ready() throws IOException {
	    return br.ready();
	}
    }
}


import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
	public static long mod= (long) (1e9 +7);
	static int p[];
	public static void main(String args[]) throws IOException
	{
		InputReader s= new InputReader(System.in);
		OutputStream outputStream= System.out;
		PrintWriter out= new PrintWriter(outputStream);
		int n= s.nextInt();
		int k= s.nextInt();
		if(k>(n/2))
			k = n-k;
		long ans[]= new long[n+1];
		ans[0]=1;
		int counter=1;
		int temp=n;
		int value=1;
		while(counter<=n){
			int x= temp/k;
			for(int i=1;i<=x;i++){
				if(value==1)
					ans[counter] = value;
				else{
					if(i==1){
						ans[counter] = value-1;
					}
					else
						ans[counter] = value;
				}
				counter++;
				//System.out.println("ds");
			}
			value+=2;
			temp = n+ temp%k;
			//System.out.println("dsas");
		}
		for(int i=1;i<=n;i++)
			ans[i] = ans[i-1]+ans[i];

		for(int i=1;i<=n;i++){
			System.out.print(ans[i]+" ");
		}
		out.close();
	}
	public static int[] createSets(int size) {
	    //int[] p = new int[size];
	    for (int i = 1; i <= size; i++)
	      p[i] = i;
	    return p;
	  }

	  public static int root(int x) {
	    return x == p[x] ? x : (p[x] = root(p[x]));
	  }

	  public static void unite(int a, int b) {
	    a = root(a);
	    b = root(b);
	    if (a != b)
	      p[a] = b;
	  }

//- See more at: http://www.java2novice.com/java-interview-programs/is-prime-number/#sthash.Cixh6tEc.dpuf
	static long combinations(long n,long r){   // O(r)
		if(r==0 || r==n) return 1;
		r= Math.min(r, n-r);
		long ans=n;  // nC1=n;
		for(int i=1;i<r;i++){
			ans= ans*(n-i);
			ans= ans/(i+1);
		}
		return ans;

	}
	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
	static long modulo(long a,long b,long c) {
		long x=1;
		long y=a;
		while(b > 0){
			if(b%2 == 1){
				x=(x*y)%c;
			}
			y = (y*y)%c; // squaring the base
			b /= 2;
		}
		return  x%c;
	}
	static void catalan_numbers(int n) {
		long catalan[]= new long[n+1];
	    catalan[1] = 1;
	    for (int i = 2; i <= n; i++) {
	        for (int j = 1; j <= i - 1; j++) {
	            catalan[i] = catalan[i] + ((catalan[j]) * catalan[i - j]);
	        }
	    }
	}

	static ArrayList<Integer> primeFactors(int n)   // O(sqrt(n))
	{
	    // Print the number of 2s that divide n
		ArrayList<Integer> arr= new ArrayList<>();
	    while (n%2 == 0)
	    {
	        arr.add(2);
	        n = n/2;
	    }

	    // n must be odd at this point.  So we can skip one element (Note i = i +2)
	    for (int i = 3; i <= Math.sqrt(n); i = i+2)
	    {
	        // While i divides n, print i and divide n
	        while (n%i == 0)
	        {
	            arr.add(i);
	            n = n/i;
	        }
	    }
	    // This condition is to handle the case when n is a prime number
	    // greater than 2
	    if (n > 2)
	        arr.add(n);

	    return arr;
	}

	public static long expo(long a, long b){
		if (b==0)
	        return 1;
	    if (b==1)
	        return a;
	    if (b==2)
	        return a*a;

	    if (b%2==0){
	            return expo(expo(a,b/2),2);
	    }
	    else{
	        return a*expo(expo(a,(b-1)/2),2);
	    }
	}
	static class Pair implements Comparable<Pair>
	{
		int f;
		int s;
		int t;
		Pair(int ii, int cc, int dd)
		{
			f=ii;
			s=cc;
			t=dd;
		}

		public int compareTo(Pair o)
		{
			return Integer.compare(this.f, o.f);
		}

	}

	public static int[] sieve(int N){    // O(n*log(logn))
		int arr[]= new int[N+1];
		for(int i=2;i<=Math.sqrt(N);i++){
			if(arr[i]==0){
				for(int j= i*i;j<= N;j= j+i){
					arr[j]=1;
				}
			}
		}
		return arr;
		// All the i for which arr[i]==0 are prime numbers.
	}
	static long gcd(long a,long b){       // O(logn)
		if(b==0) return a;
		return gcd(b,a%b);
	}

	static final class InputReader{
        private final InputStream stream;
        private final byte[] buf=new byte[1024];
        private int curChar;
        private int Chars;
        public InputReader(InputStream stream){this.stream=stream;}
        private int read()throws IOException{
            if(curChar>=Chars){
                curChar=0;
                Chars=stream.read(buf);
                if(Chars<=0)
                    return -1;
            }
            return buf[curChar++];
        }
        public final int nextInt()throws IOException{return (int)nextLong();}
        public final long nextLong()throws IOException{
            int c=read();
            while(isSpaceChar(c)){
                c=read();
                if(c==-1) throw new IOException();
            }
            boolean negative=false;
            if(c=='-'){
                negative=true;
                c=read();
            }
            long res=0;
            do{
                if(c<'0'||c>'9')throw new InputMismatchException();
                res*=10;
                res+=(c-'0');
                c=read();
            }while(!isSpaceChar(c));
            return negative?(-res):(res);
        }
        public final int[] nextIntBrray(int size)throws IOException{
            int[] arr=new int[size];
            for(int i=0;i<size;i++)arr[i]=nextInt();
            return arr;
        }
        public final String nextString()throws IOException{
            int c=read();
            while(isSpaceChar(c))c=read();
            StringBuilder res=new StringBuilder();
            do{
                res.append((char)c);
                c=read();
            }while(!isSpaceChar(c));
            return res.toString();
        }
        public final String nextLine()throws IOException{
            int c=read();
            while(isSpaceChar(c))c=read();
            StringBuilder res=new StringBuilder();
            do{
                res.append((char)c);
                c=read();
            }while(c!='\n'&&c!=-1);
            return res.toString();
        }
        private boolean isSpaceChar(int c){
            return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
        }
    }
}


import java.io.*;
import java.math.*;
import java.util.*;

public class D {
	final static int MOD = 1000000007;
	static int[] count;

	public static void main(String[] args) {
		FastReader in = new FastReader(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		count = new int[n];
		k = Math.min(k, n-k);
		int current = 0;
		long out = 1;
		int addition = 1;
		for (int i = 0; i < n; i++) {
			int next = (current + k) % n;
			if (next == 0)
				out += addition;
			if (next < k && next > 0) {
				out--;
				addition += 2;
			}
			out += addition;
			current = next;
			if (next == 0)
				System.out.print(out - addition);
			else
				System.out.print(out + " ");
		}
		System.out.println();
	}

	static long pow(long n, long p, long m) {
		long result = 1;
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		while (p != 0) {
			if (p % 2 == 1)
				result *= n;
			if (result >= m)
				result %= m;
			p >>= 1;
			n *= n;
			if (n >= m)
				n %= m;
		}
		return result;
	}

	static class Pair implements Comparable<Pair> {
		long a, b;

		public Pair(long a, long b) {
			this.a = a;
			this.b = b;
		}

		public int compareTo(Pair o) {
			if (this.a != o.a)
				return Long.compare(this.a, o.a);
			else
				return Long.compare(this.b, o.b);
		}

		public boolean equals(Object o) {
			if (o instanceof Pair) {
				Pair p = (Pair) o;
				return p.a == a && p.b == b;
			}
			return false;
		}

		public int hashCode() {
			return new Long(a).hashCode() * 31 + new Long(b).hashCode();
		}

		public String toString() {
			return "(" + this.a + "," + this.b + ")";
		}
	}

	static class FastReader {
	    private boolean finished = false;

	    private InputStream stream;
	    private byte[] buf = new byte[1024];
	    private int curChar;
	    private int numChars;
	    private SpaceCharFilter filter;

	    public FastReader(InputStream stream) {
	        this.stream = stream;
	    }

	    public int read() {
	        if (numChars == -1) {
	            throw new InputMismatchException();
	        }
	        if (curChar >= numChars) {
	            curChar = 0;
	            try {
	                numChars = stream.read(buf);
	            } catch (IOException e) {
	                throw new InputMismatchException();
	            }
	            if (numChars <= 0) {
	                return -1;
	            }
	        }

	        return buf[curChar++];
	    }

	    public int peek() {
	        if (numChars == -1) {
	            return -1;
	        }
	        if (curChar >= numChars) {
	            curChar = 0;
	            try {
	                numChars = stream.read(buf);
	            } catch (IOException e) {
	                return -1;
	            }
	            if (numChars <= 0) {
	                return -1;
	            }
	        }
	        return buf[curChar];
	    }

	    public int nextInt() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        int res = 0;
	        do {
	            if (c == ',') {
	                c = read();
	            }
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    public long nextLong() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        long res = 0;
	        do {
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    public String nextString() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        StringBuilder res = new StringBuilder();
	        do {
	            res.appendCodePoint(c);
	            c = read();
	        } while (!isSpaceChar(c));
	        return res.toString();
	    }

	    public boolean isSpaceChar(int c) {
	        if (filter != null) {
	            return filter.isSpaceChar(c);
	        }
	        return isWhitespace(c);
	    }

	    public static boolean isWhitespace(int c) {
	        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	    }

	    private String readLine0() {
	        StringBuilder buf = new StringBuilder();
	        int c = read();
	        while (c != '\n' && c != -1) {
	            if (c != '\r') {
	                buf.appendCodePoint(c);
	            }
	            c = read();
	        }
	        return buf.toString();
	    }

	    public String nextLine() {
	        String s = readLine0();
	        while (s.trim().length() == 0)
	            s = readLine0();
	        return s;
	    }

	    public String nextLine(boolean ignoreEmptyLines) {
	        if (ignoreEmptyLines) {
	            return nextLine();
	        } else {
	            return readLine0();
	        }
	    }

	    public BigInteger nextBigInteger() {
	        try {
	            return new BigInteger(nextString());
	        } catch (NumberFormatException e) {
	            throw new InputMismatchException();
	        }
	    }

	    public char nextCharacter() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        return (char) c;
	    }

	    public double nextDouble() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        double res = 0;
	        while (!isSpaceChar(c) && c != '.') {
	            if (c == 'e' || c == 'E') {
	                return res * Math.pow(10, nextInt());
	            }
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        }
	        if (c == '.') {
	            c = read();
	            double m = 1;
	            while (!isSpaceChar(c)) {
	                if (c == 'e' || c == 'E') {
	                    return res * Math.pow(10, nextInt());
	                }
	                if (c < '0' || c > '9') {
	                    throw new InputMismatchException();
	                }
	                m /= 10;
	                res += (c - '0') * m;
	                c = read();
	            }
	        }
	        return res * sgn;
	    }

	    public boolean isExhausted() {
	        int value;
	        while (isSpaceChar(value = peek()) && value != -1)
	            read();
	        return value == -1;
	    }

	    public String next() {
	        return nextString();
	    }

	    public SpaceCharFilter getFilter() {
	        return filter;
	    }

	    public void setFilter(SpaceCharFilter filter) {
	        this.filter = filter;
	    }

	    public interface SpaceCharFilter {
	        public boolean isSpaceChar(int ch);
	    }
	}
}


import java.io.*;
import java.math.*;
import java.util.*;

public class D {
	final static int MOD = 1000000007;
	static int[] count;

	public static void main(String[] args) {
		FastReader in = new FastReader(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		count = new int[n];
		k = Math.min(k, n-k);
		int current = 0;
		long out = 1;
		int addition = 1;
		StringBuilder outStr = new StringBuilder();
		for (int i = 0; i < n; i++) {
			int next = (current + k) % n;
			if (next == 0)
				out += addition;
			if (next < k && next > 0) {
				out--;
				addition += 2;
			}
			out += addition;
			current = next;
			if (next == 0)
				outStr.append(out - addition + "");
			else
				outStr.append(out + " ");
		}
		System.out.println(outStr.toString());
	}

	static long pow(long n, long p, long m) {
		long result = 1;
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		while (p != 0) {
			if (p % 2 == 1)
				result *= n;
			if (result >= m)
				result %= m;
			p >>= 1;
			n *= n;
			if (n >= m)
				n %= m;
		}
		return result;
	}

	static class Pair implements Comparable<Pair> {
		long a, b;

		public Pair(long a, long b) {
			this.a = a;
			this.b = b;
		}

		public int compareTo(Pair o) {
			if (this.a != o.a)
				return Long.compare(this.a, o.a);
			else
				return Long.compare(this.b, o.b);
		}

		public boolean equals(Object o) {
			if (o instanceof Pair) {
				Pair p = (Pair) o;
				return p.a == a && p.b == b;
			}
			return false;
		}

		public int hashCode() {
			return new Long(a).hashCode() * 31 + new Long(b).hashCode();
		}

		public String toString() {
			return "(" + this.a + "," + this.b + ")";
		}
	}

	static class FastReader {
	    private boolean finished = false;

	    private InputStream stream;
	    private byte[] buf = new byte[1024];
	    private int curChar;
	    private int numChars;
	    private SpaceCharFilter filter;

	    public FastReader(InputStream stream) {
	        this.stream = stream;
	    }

	    public int read() {
	        if (numChars == -1) {
	            throw new InputMismatchException();
	        }
	        if (curChar >= numChars) {
	            curChar = 0;
	            try {
	                numChars = stream.read(buf);
	            } catch (IOException e) {
	                throw new InputMismatchException();
	            }
	            if (numChars <= 0) {
	                return -1;
	            }
	        }

	        return buf[curChar++];
	    }

	    public int peek() {
	        if (numChars == -1) {
	            return -1;
	        }
	        if (curChar >= numChars) {
	            curChar = 0;
	            try {
	                numChars = stream.read(buf);
	            } catch (IOException e) {
	                return -1;
	            }
	            if (numChars <= 0) {
	                return -1;
	            }
	        }
	        return buf[curChar];
	    }

	    public int nextInt() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        int res = 0;
	        do {
	            if (c == ',') {
	                c = read();
	            }
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    public long nextLong() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        long res = 0;
	        do {
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    public String nextString() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        StringBuilder res = new StringBuilder();
	        do {
	            res.appendCodePoint(c);
	            c = read();
	        } while (!isSpaceChar(c));
	        return res.toString();
	    }

	    public boolean isSpaceChar(int c) {
	        if (filter != null) {
	            return filter.isSpaceChar(c);
	        }
	        return isWhitespace(c);
	    }

	    public static boolean isWhitespace(int c) {
	        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	    }

	    private String readLine0() {
	        StringBuilder buf = new StringBuilder();
	        int c = read();
	        while (c != '\n' && c != -1) {
	            if (c != '\r') {
	                buf.appendCodePoint(c);
	            }
	            c = read();
	        }
	        return buf.toString();
	    }

	    public String nextLine() {
	        String s = readLine0();
	        while (s.trim().length() == 0)
	            s = readLine0();
	        return s;
	    }

	    public String nextLine(boolean ignoreEmptyLines) {
	        if (ignoreEmptyLines) {
	            return nextLine();
	        } else {
	            return readLine0();
	        }
	    }

	    public BigInteger nextBigInteger() {
	        try {
	            return new BigInteger(nextString());
	        } catch (NumberFormatException e) {
	            throw new InputMismatchException();
	        }
	    }

	    public char nextCharacter() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        return (char) c;
	    }

	    public double nextDouble() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        double res = 0;
	        while (!isSpaceChar(c) && c != '.') {
	            if (c == 'e' || c == 'E') {
	                return res * Math.pow(10, nextInt());
	            }
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        }
	        if (c == '.') {
	            c = read();
	            double m = 1;
	            while (!isSpaceChar(c)) {
	                if (c == 'e' || c == 'E') {
	                    return res * Math.pow(10, nextInt());
	                }
	                if (c < '0' || c > '9') {
	                    throw new InputMismatchException();
	                }
	                m /= 10;
	                res += (c - '0') * m;
	                c = read();
	            }
	        }
	        return res * sgn;
	    }

	    public boolean isExhausted() {
	        int value;
	        while (isSpaceChar(value = peek()) && value != -1)
	            read();
	        return value == -1;
	    }

	    public String next() {
	        return nextString();
	    }

	    public SpaceCharFilter getFilter() {
	        return filter;
	    }

	    public void setFilter(SpaceCharFilter filter) {
	        this.filter = filter;
	    }

	    public interface SpaceCharFilter {
	        public boolean isSpaceChar(int ch);
	    }
	}
}


import java.util.*;
import java.io.*;
import java.math.BigInteger;
import java.nio.file.WatchEvent.Kind;

public class D {
    FastScanner in;
    PrintWriter out;
    boolean systemIO = true;

    public void solve() {
    	int n = in.nextInt();
    	int k = in.nextInt();
    	if (k > n / 2) {
			k = n - k;
		}
    	int th = 1;
    	long ans = 1;
    	int v = 0;
    	for (int i = 0; i < n; i++) {
			v = v + k;
			ans += th;
			if (v > n) {
				v -= n;
				ans++;
				th += 2;
			}
			out.print(ans + " ");
		}
    }

    public void run() {
        try {
            if (systemIO) {
                in = new FastScanner(System.in);
                out = new PrintWriter(System.out);
            } else {
                in = new FastScanner(new File("segments.in"));
                out = new PrintWriter(new File("segments.out"));
            }
            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String nextLine() {
            try {
                return br.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                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());
        }

    }
    public static void main(String[] arg) {
        new D().run();
    }
}


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() ;
    	int [] BIT = new int[n+1] ;
    	Arrays.fill(BIT,0);
    	int 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,int [] BIT)
    {
    	for(int i = 1 ; i<=n ; i++)
    	{
    		print(query(BIT,i)-query(BIT,i-1)+" ") ;
    	}
    	println() ;
    }
    static int split_q(int [] 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(int [] BIT,int x, int y)
    {
    	return query(BIT,y)-query(BIT,x-1) ;
    }
    static void updateBIT(int[] arr, int pos, int val)
    {
        int len = arr.length;
        for (; pos < len; pos |= (pos + 1))
            arr[pos] += val;
    }
    static int query(int[] arr, int pos)
    {
        int sum = 0;
        for (; pos >= 0; pos = (pos & (pos + 1)) - 1)
            sum += arr[pos];
        return sum;
    }
}


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() ;
    	long [] BIT = new long[n+1] ;
    	Arrays.fill(BIT,0);
    	int 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;
    }
}


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);
    	int 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;
    }
}


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;
    }
}


/**
 * "PolandBall and Polygon"
 * http://codeforces.com/contest/755/problem/D
 * @author Ariana Herbst
 * January 15, 2017
 */
import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class VentureCupD {
    static StringBuilder sb;

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int N = sc.nextInt();
        int K = sc.nextInt();
        if (K > N / 2)
        {
            K = N - K;
        }
        SegmentTree tree = buildTree(1, N);
        sb = new StringBuilder();

        int start = 1;
        int end  = 1 + K;
        boolean endNext = false;
        long count = 1;
        while (true)    {
            count++;
            int i = start + 1;
            if (i > N)  {
                i -= N;
            }
            int j = end + K - 1;
            if (j > N)  {
                j -= N;
            }
            if (j < i)
            {
                count += tree.getVal(i , N);
                count += tree.getVal(1, j);
            }
            else {
                count += tree.getVal(i, j);
            }
           // if(sb.length() > 10000){
             //   System.out.print(sb);
              //  sb = new StringBuilder();
            //}
            sb.append(count + " ");
            tree.addVal(end);
            start = end;
            end = end + K;
            if (end > N)
                end -= N;
            if (endNext)
            {
                System.out.print(sb);
                System.exit(0);
            }
            if (end == 1) {
                endNext = true;
            }

        }

    }

    public static class SegmentTree {
        SegmentTree m, n;
        int a, b;
        int val;
        //SegmentTree parent = null;
        public SegmentTree(int a, int b)    {
            this.a = a; this.b = b;
            val = 0;
        }
        public int getVal(int x, int y)
        {
            if (x <= a && y >= b)
            {
                return val;
            }
            int newVal = 0;
            if ((y >= a) && (y <= b) || (x <= b) && (x >= a))
            {
                newVal += m.getVal(x, y);
                newVal += n.getVal(x, y);
            }
            return newVal;
        }
        public void addVal(int end) {
            val++;
            if (end <= b && end >= a && a != b)
            {
                if (end <= (a + b) / 2)
                {
                    m.addVal(end);
                }
                else
                {
                    n.addVal(end);
                }
            }
        }
    }

    public static SegmentTree buildTree(int a, int b)
    {
        SegmentTree tree = new SegmentTree(a, b);
        if (a != b)
        {
            SegmentTree childa = buildTree(a, (a + b) / 2);
            tree.m = childa;
           // childa.parent = tree;
            SegmentTree childb = buildTree((a + b) /2 + 1, b );
            tree.n = childb;
           // childb.parent = tree;
        }
        return tree;
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(Reader in) {
            br = new BufferedReader(in);
        }

        public FastScanner() {
            this(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 readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readIntArray(int n) {
            int[] a = new int[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextInt();
            }
            return a;
        }

        long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextLong();
            }
            return a;
        }
    }
}


/**
 * "PolandBall and Polygon"
 * http://codeforces.com/contest/755/problem/D
 * @author Ariana Herbst
 * January 15, 2017
 */
import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class VentureCupD {
    static StringBuilder sb;

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int N = sc.nextInt();
        int K = sc.nextInt();
        if (K > N / 2)
        {
            K = N - K;
        }
        SegmentTree tree = buildTree(1, N);
        sb = new StringBuilder();

        int start = 1;
        int end  = 1 + K;
        boolean endNext = false;
        long count = 1;
        while (true)    {
            count++;
            int i = start + 1;
            if (i > N)  {
                i -= N;
            }
            int j = end + K - 1;
            if (j > N)  {
                j -= N;
            }
            if (j < i)
            {
                count += tree.getVal(i , N);
                count += tree.getVal(1, j);
            }
            else {
                count += tree.getVal(i, j);
            }
            if(sb.length() > 10000){
                System.out.print(sb);
                sb = new StringBuilder();
            }
            sb.append(count + " ");
            tree.addVal(end);
            start = end;
            end = end + K;
            if (end > N)
                end -= N;
            if (endNext)
            {
                System.out.print(sb);
                System.exit(0);
            }
            if (end == 1) {
                endNext = true;
            }

        }

    }

    public static class SegmentTree {
        SegmentTree m, n;
        //ArrayList<SegmentTree> children = new ArrayList(2);
        int a, b;
        int val;
        SegmentTree parent = null;
        public SegmentTree(int a, int b)    {
            this.a = a; this.b = b;
            val = 0;
        }
        public int getVal(int x, int y)
        {
            if (x <= a && y >= b)
            {
                return val;
            }
            int newVal = 0;
            if ((y >= a) && (y <= b) || (x <= b) && (x >= a))
            {
                newVal += m.getVal(x, y);
                newVal += n.getVal(x, y);
            }
            return newVal;
        }
        public void addVal(int end) {
            val++;
            if (end <= b && end >= a && a != b)
            {
                if (end <= (a + b) / 2)
                {
                    m.addVal(end);
                }
                else
                {
                    n.addVal(end);
                }
            }
        }
       // public void addChild(SegmentTree child)
        //{
          //  children.add(child);
       // }
    }

    public static SegmentTree buildTree(int a, int b)
    {
        SegmentTree tree = new SegmentTree(a, b);
        if (a != b)
        {
            SegmentTree childa = buildTree(a, (a + b) / 2);
            tree.m = childa;
            childa.parent = tree;
            SegmentTree childb = buildTree((a + b) /2 + 1, b );
            tree.n = childb;
            childb.parent = tree;
        }
        return tree;
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(Reader in) {
            br = new BufferedReader(in);
        }

        public FastScanner() {
            this(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 readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readIntArray(int n) {
            int[] a = new int[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextInt();
            }
            return a;
        }

        long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextLong();
            }
            return a;
        }
    }
}


/**
 * "PolandBall and Polygon"
 * http://codeforces.com/contest/755/problem/D
 * @author Ariana Herbst
 * January 15, 2017
 */
import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class VentureCupD {
    static StringBuilder sb;

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int N = sc.nextInt();
        int K = sc.nextInt();
        if (K > N / 2)
        {
            K = N - K;
        }
        SegmentTree tree = buildTree(1, N);
        sb = new StringBuilder();

        int start = 1;
        int end  = 1 + K;
        boolean endNext = false;
        int count = 1;
        while (true)    {
            count++;
            int i = start + 1;
            if (i > N)  {
                i -= N;
            }
            int j = end + K - 1;
            if (j > N)  {
                j -= N;
            }
            if (j < i)
            {
                count += tree.getVal(i , N);
                count += tree.getVal(1, j);
            }
            else {
                count += tree.getVal(i, j);
            }
            if(sb.length() > 10000){
                System.out.print(sb);
                sb = new StringBuilder();
            }
            sb.append(count + " ");
            tree.addVal(end);
            start = end;
            end = end + K;
            if (end > N)
                end -= N;
            if (endNext)
            {
                System.out.print(sb);
                System.exit(0);
            }
            if (end == 1) {
                endNext = true;
            }

        }

    }

    public static class SegmentTree {
        ArrayList<SegmentTree> children = new ArrayList(2);
        int a, b;
        int val;
        SegmentTree parent = null;
        public SegmentTree(int a, int b)    {
            this.a = a; this.b = b;
            val = 0;
        }
        public int getVal(int x, int y)
        {
            if (x <= a && y >= b)
            {
                return val;
            }
            int newVal = 0;
            if ((y >= a) && (y <= b) || (x <= b) && (x >= a))
            {
                newVal += children.get(0).getVal(x, y);
                newVal += children.get(1).getVal(x, y);
            }
            return newVal;
        }
        public void addVal(int end) {
            val++;
            if (end <= b && end >= a && a != b)
            {
                if (end <= (a + b) / 2)
                {
                    children.get(0).addVal(end);
                }
                else
                {
                    children.get(1).addVal(end);
                }
            }
        }
        public void addChild(SegmentTree child)
        {
            children.add(child);
        }
    }

    public static SegmentTree buildTree(int a, int b)
    {
        SegmentTree tree = new SegmentTree(a, b);
        if (a != b)
        {
            SegmentTree childa = buildTree(a, (a + b) / 2);
            tree.addChild(childa);
            childa.parent = tree;
            SegmentTree childb = buildTree((a + b) /2 + 1, b );
            tree.addChild(childb);
            childb.parent = tree;
        }
        return tree;
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(Reader in) {
            br = new BufferedReader(in);
        }

        public FastScanner() {
            this(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 readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readIntArray(int n) {
            int[] a = new int[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextInt();
            }
            return a;
        }

        long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextLong();
            }
            return a;
        }
    }
}