func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1E3 + 5;   int n;   struct line {     int x, y, w, num;     line(int a = 0, int b = 0, int c = 0, int d = 0) : x(a), y(b), w(c), num(d) {}     bool operator<(const line& A) const { return w > A.w; }   } a[maxn], b[maxn];   vector<line> ans;   inline bool inter(line x, line y) {     int l1 = min(x.x, x.y), r1 = max(x.x, x.y);     int l2 = min(y.x, y.y), r2 = max(y.x, y.y);     return (l1 < l2 && l2 < r1 && r1 < r2) || (l2 < l1 && l1 < r2 && r2 < r1);   }   inline int dis(line A, int x) {     int l = min(A.x, A.y), r = max(A.x, A.y);     if (l <= x && x <= r) return n - (r - l);     return r - l;   }   inline void solve(int x, int y) {     vector<line> wait;     for (int i = 1; i <= n - 3; ++i)       if (inter(a[i], line(x, y)))         wait.push_back(line(a[i].x, a[i].y, dis(a[i], x), i));     if (wait.size() == 0) return;     sort(wait.begin(), wait.end());     for (int i = 0; i < wait.size() - 1; ++i) {       ans.push_back(wait[i]);       int p = wait[i].num;       if (wait[i].x == wait[i + 1].x) {         a[p].x = wait[i + 1].y;         a[p].y = x;       } else if (wait[i].y == wait[i + 1].x) {         a[p].y = wait[i + 1].y;         a[p].x = x;       } else if (wait[i].x == wait[i + 1].y) {         a[p].x = wait[i + 1].x;         a[p].y = x;       } else {         a[p].y = wait[i + 1].x;         a[p].x = x;       }     }     ans.push_back(wait[wait.size() - 1]);     int p = wait[wait.size() - 1].num;     a[p].x = x, a[p].y = y;   }   int main() {     ios::sync_with_stdio(false);     cin >> n;     for (int i = 1; i <= n - 3; ++i) cin >> a[i].x >> a[i].y;     for (int i = 1; i <= n - 3; ++i) cin >> b[i].x >> b[i].y;     random_shuffle(b + 1, b + n - 3 + 1);     for (int i = 1; i <= n - 3; ++i) solve(b[i].x, b[i].y);     cout << ans.size() << endl;     for (int i = 0; i < ans.size(); ++i)       cout << ans[i].x <<     << ans[i].y <<   n ;     return 0;   }   