import java.time.LocalDate; import java.util.Scanner; public class No1020 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String str = sc.next(); char[] c = str.toCharArray(); char[] newC = new char[n]; for(int i=0;i<(n-k+1);i++) { for(int j=i;j<(k+i);j++){ newC[k-j]=c[k]; } c=newC; } for(char c1 : c) { System.out.println(c1); } System.out.println(""); } }