/* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.System.out; /** * * @author cteam059 */ public class encipher { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(br.readLine()); while(count != 0) { String text = br.readLine().toUpperCase(); StringBuilder sb = new StringBuilder(text.length()); for(int i = 0; i < text.length(); i++) { char ch = text.charAt(i); if(ch != ' ') sb.append(ch); } text = sb.toString(); int lenght = text.length(); char[] result = new char[lenght]; int level = 0; int lastPosition = 0; for(int i = 0; i < lenght; i ++) { result[lastPosition] = text.charAt(i); lastPosition += count; if(lastPosition >= lenght) { lastPosition = ++level; } } out.println(new String(result)); count = Integer.parseInt(br.readLine()); } } }