#include <bits/stdc++.h>
using namespace std;

int n;
int main(){

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    cin >> n;
    cout << 6 << " " << 1 << " " << 5 << '\n';
    cout << 4 << " " << 2 << " " << 3 << '\n';

    return 0;
}