import java.util.Scanner; public class encipher { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for (;;) { int n = sc.nextInt(); sc.nextLine(); if (n == 0) break; String str = sc.nextLine(); str = str.toUpperCase().replace(" ", ""); int len = str.length(); boolean[] b = new boolean[len]; char[] c = new char[len]; int index = 0; int pos = 0; boolean first = true; while (true) { if (first) { pos = 0; while (b[pos] == true) pos++; first = false; } c[pos] = str.charAt(index); b[pos] = true; index++; if (index >= len) break; pos += n; if (pos >= len) first = true; } System.out.println(c); } } /* * * 2 CTU Open Programming Contest * */ }