#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
string s;
cin >> n;
cin.get();
getline(cin, s);
while (s.size() % n) s += ' ';
int m = s.size() / n;
char a[n][m];
int l = 0;
for (int i = m - 1; i >= 0; i--)
for (int j = 0; j < n; j++) a[j][i] = s[l++];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++) cout << a[i][j];
cout << endl;
}
return 0;
}