#include<bits/stdc++.h>

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cerr.tie(0);
	int n;
	cin >> n;
	deque<int> brojevi;
	deque<int> a, b;
	cout << "6 2 5" << endl
    cout << "4 1 3";
	return 0;
}