#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    int n;
    cin>>n;
    vector<int>a(n);
    vector<int>b(n);
    int poc=n+1;
    int br=0;
    int t=n-1;
    int m=n;
    int pom;
    while(t>=br+1)
    {
        a[t]=poc;
        b[t]=n;
        a[br]=poc+1;
        b[br]=n-1;
        n=n-2;
        poc=poc+2;
        br++;
        t--;
        if(br==t)
        {
            a[t]=poc;
            b[t]=n;
        }

    }
    for(int i=1;i<m;i=i+2)
    {
            pom=a[i];
            a[i]=b[i];
            b[i]=pom;
    }
    for(int i=0;i<m;i++)
        cout<<a[i]<<" ";
    cout<<endl;
    for(int i=0;i<m;i++)
        cout<<b[i]<<" ";
    return 0;
}