1. 


/* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #11192 (Group Reverse)
* Link: http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&Itemid=8&category=23&page=show_problem&problem=2133
*
* @author Dennis Wilfert
* @author Johann Studt
* @version 1.0, 04/17/2009
*
* Status : Accepted
* Runtime: 0.330
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

public static void main(String[] args) {

BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

Scanner scanner = new Scanner(reader);
// Teiler
int number;
// Zeile als char-Array
char[] line;
// Zeilenlaenge
int linelength;

while(scanner.hasNext()){

number = scanner.nextInt();
if(number==0)break;

line = scanner.next().toCharArray();
linelength = line.length;

number = linelength/number;

// Array durchlaufen und Blockweise rueckwaerts ausgeben
for(int i = number-1; i < linelength; i+=number ){
for(int j = 0; j < number; j++){
System.out.print(line[i-j]);
}
}
System.out.println();
}

}

}