#include using namespace std; #define FOR(i, begin, end) for(int i=(begin);i<(end);i++) #define REP(i, n) FOR(i,0,n) int main(){ const int MAX = 10000; int N; cin >> N; vector A(N), B(N); REP(i, N){ A[i] = 6 + 3 * i; B[i] = 1 + 3 * i; } if(N % 3 == 1){ B[0]--; }else if(N % 3 == 2){ B[0]--; B[1]--; } int dif = 0; REP(i, N){ dif += A[i]; dif -= B[i]; } int i0 = N - 1; while(dif > 0){ int limit = MAX; if(i0 + 1 < N) limit = B[i0 + 1] - 3; if(B[i0] + 3 <= limit){ B[i0] += 3; dif -= 3; }else{ i0--; } } REP(i, N) cout << A[i] << ' '; cout << endl; REP(i, N) cout << B[i] << ' '; cout << endl; return 0; }