#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int k = 1;
while (k * k < n)
k++;
vector<vector<char>> a(k, vector<char>(k));
for (int i = 0; i < k; i++)
{
for (int j = 0; j < k; j++)
{
char c;
cin >> c;
a[i][j] = c;
}
}
string ans;
for (int x = 0; x < 2 * k - 1; x++)
{
for (int i = 0; i < k; i++)
{
int j = x - i;
if (j >= 0 && j < k)
{
ans += a[i][j];
}
}
}
cout << ans << "\n";
return 0;
}