import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int m = sc.nextInt();
int i=0;
while(n>m){
int avg=m+1+2*m*i;
System.out.print(avg+" ");
n=n-m;
i++;
}
int avg2 = (n+1)+2*m*i;
System.out.println(avg2);
}
}
}
import java.util.Scanner;
class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
if (n == 0) {
return;
} else {
int[] a = new int[n];
a[0] = sc.nextInt();
int min = a[0], pos = 0;
for (int i = 1; i < n; i++) {
a[i] = sc.nextInt();
if (a[i] < min) {
min = a[i];
pos = i;
}
}
if(pos!=0){
a[pos]=a[0];
a[0]=min;
}
for(int i=0;i<n-1;i++){
System.out.print(a[i]+" ");
}
System.out.println(a[n-1]);
}
}
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n-->0){
String str = sc.next();
int count=0;
for(int i=0;i<str.length();i++){
char ch = str.charAt(i);
if(ch>='0'&&ch<='9'){
count++;
}
}
System.out.println(count);
}
}
}