func_code_string: #include <bits/stdc++.h>   using namespace std;   long long f(long long x) { return x * (x - 1) / 2; }   vector<int> g[303];   int m1[303][303];   int m2[303][303];   int main() {     int n, m, k;     cin >> n >> m >> k;     vector<int> a(k);     vector<int> c(n + 1, 0);     for (int i = 0; i < k; i++) {       cin >> a[i];       c[a[i]] = 1;     }     vector<pair<int, int>> r;     if (k == n) {       cout << -1;       return 0;     }     int V, X;     for (int x = 1; x <= n; x++) {       if (!c[x])         V = x;       else         X = x;     }     m--;     r.push_back({X, V});     for (int x = 1; x <= n; x++) {       if (x == V || x == X) continue;       if (m > 0) {         r.push_back({x, V});         m--;       }     }     for (int x = 1; x <= n; x++) {       if (x == V || x == X) continue;       for (int y = x + 1; y <= n; y++) {         if (y == V || y == X) continue;         if (m > 0) {           m--;           r.push_back({x, y});         }       }     }     for (int x = 1; x <= n; x++) {       if (X == x || V == x || c[x]) continue;       if (m > 0) {         m--;         r.push_back({X, x});         ;       }     }     if (m) {       cout << -1;       return 0;     }     for (int i = 0; i < r.size(); i++) {       cout << r[i].first <<     << r[i].second << endl;     }     return 0;   }   