#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int N, K;
char s[1010];
char tmp[1010];
int perm[1010], perm2[1010];

bool visited[1010];
int go(int x) {
	int ret = 0;
	while(!visited[x]) {
		ret++;
		visited[x] = 1;
		x = perm[x];
	}
	return ret;
}

int main()
{
    int i, mid;
	scanf("%d%s", &N, s);
	K = strlen(s);

	if(K <= 2) {
		printf("%s\n", s);
		return 0;
	}
    mid=K / 2;
	for(i = 0; i < K; i++) perm2[i] = i;
	for(i = 0; i < mid; i++) {
		perm[2 * i] = perm2[i];
		perm[2 * i + 1] = perm2[K - i - 1];
	}
	if(K & 1) perm[K - 1] = perm2[mid];


	int ciklus = 1;
	for( i = 0; i < K; i++) {
		if(visited[i]) continue;
		int t = go(i);
		ciklus = ciklus * t / __gcd(ciklus, t);
	}

	N %= ciklus;
	N = ciklus - N;

	for( i = 0; i < N; i++) {
		for(int j = 0; j < K / 2; j++) {
			tmp[2 * j] = s[j];
			tmp[2 * j + 1] = s[K - j - 1];
		}
		if(K & 1) tmp[K - 1] = s[K / 2];
		memcpy(s, tmp, sizeof s);
	}

	printf("%s\n", s);

	return 0;

}
