#include <iostream>
using namespace std;
int main()
{
    int N,i,j,M;
    cin>>N;
    for(i=1,j=2*N;i<=N/2;i++,j--)
    {
        cout<<j<<i;
        if(i==N/2 && N%2!=0)cout<<j-1;
    }
    cout<<endl;
    if(N%2!=0)M=N-1;
    else M=N;
    for(i=N/2+1,j=2*N-(N+1)/2;i<=M;i++,j--)
    {
        cout<<j<<i;
        if(i==M && N%2!=0)cout<<j-1;
    }
    return 0;
}