import java.util.Scanner;
public class 字符串跳步 {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
String s = sc.next();
int start = sc.nextInt();
int step = sc.nextInt();
String ss="";
for (int i = start; i <s.length(); i+=step) {
ss=ss+s.charAt(i);
}
System.out.println(ss);
}
}