#include "triangles.h"
#include <bits/extc++.h>

using namespace std;

vector <vector <int>> solve(int n) {
    vector<Triangle> T1 = {Triangle(0, 1, 2)};
    vector<Triangle> T2 = {Triangle(0, 1, 3)};
    vector<Triangle> T3 = {Triangle(0, 2, 3)};
    vector<Triangle> T4 = {Triangle(1, 2, 3)};
    int res = compare(T1, T2);
    if (res == 1) swap(T1, T2);
    res = compare(T1, T3);
    if (res == 1) swap(T1, T3);
    res = compare(T1, T4);
    if (res == 1) swap(T1, T4);
    set <int> s = {1,2,3,4};
    auto [i,j,k] = T1;
    s.erase(i);
    s.erase(j);
    s.erase(k);
    int ost = *s.begin();
    return {{i,j,ost}, {i,k,ost}, {j,k,ost}};
}