//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <numeric>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <bitset>
#include <random>
#include <queue>
#include "triangles.h"
#include <cstdint>
using namespace std;
//#pragma GCC target("avx,avx2,tune=native,sse,sse2")
#define int long long

const int mod = 998244353;


inline bool vsuprun() {
	static int it = 0;
	static bool done = false;
	if (it++ == 5) {
		it = 0;
		if (1.0 * clock() / CLOCKS_PER_SEC > 0.9) {
			done = true;
		}
	}
	return done;
}

std::vector<std::vector<int>> solve(int n) {
	if (n == 4) {
		bool fl0 = 0, fl1 = 0, fl2 = 0, fl3 = 0;
		vector<Triangle> left;
		vector<Triangle> right;
		left.push_back(Triangle(0, 1, 2));
		left.push_back(Triangle(0, 1, 3));
		left.push_back(Triangle(0, 2, 3));
		right.push_back(Triangle(1, 2, 3));
		int c = compare(left, right);
		if (c == 0) {
			fl0 = 1;
		}
		left.clear();
		right.clear();

		left.push_back(Triangle(1, 2, 0));
		left.push_back(Triangle(1, 3, 0));
		left.push_back(Triangle(1, 2, 3));
		right.push_back(Triangle(0, 2, 3));
		c = compare(left, right);
		if (c == 0) {
			fl1 = 1;
		}
		left.clear();
		right.clear();

		left.push_back(Triangle(2, 1, 0));
		left.push_back(Triangle(2, 3, 0));
		left.push_back(Triangle(2, 3, 1));
		right.push_back(Triangle(0, 1, 3));
		c = compare(left, right);
		if (c == 0) {
			fl2 = 1;
		}
		left.clear();
		right.clear();

		left.push_back(Triangle(3, 0, 1));
		left.push_back(Triangle(3, 0, 2));
		left.push_back(Triangle(3, 1, 2));
		right.push_back(Triangle(0, 1, 2));
		c = compare(left, right);
		if (c == 0) {
			fl3 = 1;
		}
		left.clear();
		right.clear();

		if (fl0 == 1) {
			vector<vector<int>> ans;
			vector<int> h = { 1, 2, 3 };
			ans.push_back(h);
			return ans;
		}
		if (fl1 == 1) {
			vector<vector<int>> ans;
			vector<int> h = { 0, 2, 3 };
			ans.push_back(h);
			return ans;
		}
		if (fl2 == 1) {
			vector<vector<int>> ans;
			vector<int> h = { 0, 1, 3 };
			ans.push_back(h);
			return ans;
		}
		if (fl3 == 1) {
			vector<vector<int>> ans;
			vector<int> h = { 0, 1, 2 };
			ans.push_back(h);
			return ans;
		}
		vector<vector<int>> ans;
		ans.push_back({ 0, 1, 2 });
		ans.push_back({ 0, 2, 3 });
		return ans;
	}
	vector<vector<int>> ans;
	return ans;
}
