#include <iostream>
#include <vector>
#include <cstdint>
#include "triangles.h"
#include <cassert>

using namespace std;

int fun(int r, int n) {
	return r % n;
}

std::vector<std::vector<int>> solve(int n) {
	std::vector<Triangle> left = { Triangle(0, 1, 2) };
	std::vector<Triangle> right = { Triangle(0, 1, 2) };
	int compare_result = compare(left, right);

	int ind = -1;
	for (int i = 0; i < 4; ++i) {
		bool fl = false;
		vector<Triangle> left = { Triangle(fun(i + 1, n), fun(i + 2, n), fun(i + 3, n)) };
		vector<Triangle> lright = { Triangle(fun(i, n), fun(i + 1, n), fun(i + 2, n)), Triangle(fun(i, n), fun(i + 1, n), fun(i + 3, n)), Triangle(fun(i, n), fun(i + 2, n), fun(i + 3, n)) };
		if (compare(left, right) == 0) {
			ind = i;
			break;
		}
	}
	vector<vector<int>> ans(1);
	if (ind != -1) {
                assert(false);
		for (int i = 0; i < n; ++i) {
			if (ind != i) {
				ans[0].push_back(i);
			}
		}
	} else {
		vector<Triangle> left = { Triangle(0, 1, 2) };
		vector<Triangle> lright = { Triangle() };
		ans[0] = { 0, 1, 2, 3 };
	}
	return ans;
}