#include <bits/stdc++.h>

#define int int64_t

signed main()
{
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int n;
  std::cin >> n;
  std::vector<int> a;
  for(int i = 1; i <= n * 2; i++) {
    a.push_back(i);
  }
  int ans = 0;
  std::vector<int> v;
  do{
    int cnt = 0;
    for(int i = 0; i < n - 1; i++) {
      cnt += std::abs(a[i] - a[i + 1]);
    }
    for(int i = n; i < 2 * n - 1; i++) {
      cnt += std::abs(a[i] - a[i + 1]);
    }
    if(cnt > ans) {
      v = a;
      ans = cnt;
    }
    if(cnt == 67) {
      for(auto x : a) {
        std::cout << x << " ";
      }
    }
  }while(next_permutation(a.begin(), a.end()));
  for(int i = 0; i < n; i++) {
    std::cout << v[i] << " ";
  }
  std::cout << "\n";
  for(int i = n; i < 2 * n; i++) {
    std::cout << v[i] << " ";
  }
}
/**


int n, q;
  std::cin >> n >> q;
  std::vector<char> a(n + 1);
  for(int i = 1; i <= n; i++) {
    std::cin >> a[i];
  }
  std::vector<int> suf6(n + 2);
  int sufiks = 0;
  std::vector<int> val_suf(n + 2);
  for(int i = n; i >= 1; i--) {
    if(a[i] == '7' || a[i] == '?') {
      sufiks += 1;
      suf6[i] = suf6[i + 1];
    }
    else {
      suf6[i] = suf6[i + 1] + sufiks;
    }
    val_suf[i] = sufiks;
  }
  std::vector<int> cnt6(n + 2);
  for(int i = n; i >= 1; i--) {
    if(a[i] == '6') {
      cnt6[i] = cnt6[i + 1] + 1;
    }
    else {
      cnt6[i] = cnt6[i + 1];
    }
  }
  while(q--) {
    int l, r;
    std::cin >> l >> r;
    int ans = 0;
    for(int x = l; x <= r; x++) {
      // suf6[l] - cnt6[l] * (suf7?[r + 1])
      int desno = suf6[x] - suf6[r + 1] - (cnt6[x] - cnt6[r + 1]) * val_suf[r + 1];
      int levo = sufi[l] - sufi[x]
      ans = std::max(ans, levo + desno);
    }
    std::cout << ans << "\n";
  }

**/