public class acm2015 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
int n = in.nextInt();
int m = in.nextInt();
int count = 0;
int num = 2;
for (int k = 0; k < n / m; k++) {
if (count > 0) {
System.out.print(" " + (num + m - 1));
} else
System.out.print(num + m - 1);
num += 2 * m;
count++;
}
if (n % m == 0) {
System.out.println();
} else {
System.out.println(" " + (num + (n % m - 1)));
}
}
}
}