#include #include #include using namespace std; int main() { cin.tie(nullptr), ios::sync_with_stdio(false); int N; cin >> N; int p = 3; // [0, 0, 0, 0, ..., 0] vs. [1, 1, 1, 1, ..., -(N - 1)] while ((N - 2) % p == 0) ++p; vector A, B; for (int i = 1; i <= 10000; ++i) { if (i % p == 0 and int(A.size()) < N) A.push_back(i); if (i % p == 1 and int(B.size()) < N - 1) B.push_back(i); } B.push_back(accumulate(A.begin(), A.end(), 0LL) - accumulate(B.begin(), B.end(), 0LL)); for (auto x : A) cout << x << ' '; cout << '\n'; for (auto x : B) cout << x << ' '; cout << '\n'; }