import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.util.Scanner; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author cteam063 */ public class encipher { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); String message; int j, cur; while (n != 0) { message = readLine().trim(); message = removeSpaces(message); char[] ret = new char[message.length()]; cur = 0; for (int i = 0; i < n; i++) { j = i; while (j < ret.length) { ret[j] = message.charAt(cur); cur++; j += n; } } System.out.println(String.valueOf(ret)); n = scanner.nextInt(); } } public static String removeSpaces(String message) { StringBuilder str = new StringBuilder(); String[] words = message.split(" "); for (String word : words) { str.append(word.trim().toUpperCase()); } return str.toString(); } public static String readLine() { String ret = ""; try { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ret = reader.readLine(); } catch (IOException ex) { } return ret; } }