#include<iostream>
using namespace std;
string state[1010];
int main()
{
    int m;
    string s;
    //ios_base::sync_with_stdio(false);
    //cin.tie(0);
    cin>>m;
    cin>>s;
    for(int i=0;i<1010;i++)state[i]="";
    int n=s.size();
    state[0]=s;
    int cycle=1;
    for(int i=1;i<n;i++)
    {
        for(int j=0;j<n;j+=2)
        {
            state[i]+=state[i-1][j];
        }
        int goback=n-1;
        if(goback%2==0)goback--;
        for(int j=goback;j>=1;j-=2)
        {
            state[i]+=state[i-1][j];
        }
        if(state[i]==s){cycle=i;break;}
    }
    cout<<state[m%cycle]<<"\n";
}
