import java.io.BufferedReader;
import java.io.InputStreamReader;

public class encipher {

	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String vstup = in.readLine(); 
			int n = Integer.valueOf(vstup);
			if(n ==0)break;
			String vt = in.readLine();
			vt = vt.replaceAll(" ", "");
			vt = vt.toUpperCase();
			int l = vt.length(); 
			if (n>l){
				System.out.print(vt);
				continue;
			}
			
			int j = 0;
			
			String[] pole = new String[l];
			
			if (l%n==0){
				
				int pom = 0;
				
				for(int i = 0;i<l;i++){
					pole[j] = vt.substring(i, i+1);
					j = (j+n) % l;
					
					if (j==pom){
						j++;
						pom++;
					}
					
				}
				
				for(int i = 0;i<l;i++){
					System.out.print(pole[i]);
				}
				
			}else{
				for(int i = 0;i<l;i++){
					pole[j] = vt.substring(i, i+1);
					j = (j+n) % l;
					
				}
				
				for(int i = 0;i<l;i++){
					System.out.print(pole[i]);
				}
			}
		}
	}

}
