#include "triangles.h"

using namespace std;

vector<vector<int>> solve(int n) {
	for (int i = 0; i < 4; i++) {
		vector<int> v;
		for (int j = 0; j < 4; j++)
			if (i != j)
				v.push_back(j);
		if (compare({ Triangle(i, v[0], v[1]), Triangle(i, v[1], v[2]), Triangle(i, v[0], v[2]) },
			{ Triangle(v[0], v[1], v[2]) }) == 0)
			return { {i, v[0], v[1]}, {i, v[1], v[2]}, {i, v[0], v[2]} };
	}

	for (int i = 1; i < 4; i++) {
		vector<int> v;
		for (int j = 1; j < 4; j++)
			if (i != j)
				v.push_back(j);
		if (compare(
			{ Triangle(0, 1, v[0]), Triangle(0, 1, v[1]) },
			{ Triangle(v[0], v[1], 0), Triangle(v[0], v[1], 1) }) == 0)
			return { {0, 1, v[0]}, {0, 1, v[1]} };
	}
	return { {0, 1, 2, 3} };
}
