#include <iostream>
#include <string>
using namespace std;

char grid[50][20];

int main()
{
	int n;
	string s;
	cin >> n;
	while (n != 0) {
		cin >> s;
		int rows = s.length()/n;
		int i,j,k=0;
		for(i=0; i<rows; i++) {
			for(j=0; j<n; j++) {
				if (i%2 == 0) {
					grid[i][j] = s[k++];
				}
				else {
					grid[i][n-j-1] = s[k++];
				}
			}
		}

		for(j=0; j<n; j++)
			for(i=0; i<rows; i++)
				cout << grid[i][j];
		cout << endl;

		cin >> n;
	}

	return 0;
}

