import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str = in.next(); int n = str.length(); int m = in.nextInt(); int[] ds = new int[n-1]; for(int i=0;i<n-1;++i){ ...