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

#define len(v) (int)v.size()
#define all(v) v.begin(), v.end()

using namespace std;
using ll = long long int;
using ld = long double;

vector<vector<int>> solve(int n) {
    Triangle a(0, 1, 2), b(0, 2, 3), c(1, 2, 3), d(3, 0, 1);
    if (compare({a, b}, {c, d}) == 0) {
        return {{0, 1, 2}, {0, 2, 3}};
    }
    for (int i = 0; i < 4; ++i) {
        int next = (i + 1) % 4;
        int next2 = (i + 2) % 4;
        int prev = (i + 3) % 4;
        Triangle A(i, next, prev), B(i, next, next2), C(i, next2, prev);
        Triangle D(next, next2, prev);
        if (compare({A, B, C}, {D}) == 0) {
            return {{i, next, next2}, {i, next2, prev}};
        }
    }
}