func_code_string: #include <bits/stdc++.h>   using namespace std;   int rx[4] = {0, 0, 1, -1};   int ry[4] = {-1, 1, 0, 0};   int main() {     int n, k, a, b, u, v;     cin >> n >> k;     cin >> a >> b >> u >> v;     if (k < n + 1 || n == 4) {       cout << -1 << endl;       return 0;     }     int ind1, ind2;     vector<int> p(n + 1);     p[1] = a;     int ct = 2, i = 1;     while (ct <= n - 1) {       if (i == a || i == b) {         i++;         continue;       }       p[ct] = i;       ct++;       i++;     }     p[n] = b;     for (int i = 1; i < n - 2; i++) {       if ((p[i] == u && p[i + 1] == v) || (p[i] == v && p[i + 1] == u)) {         swap(p[i + 1], p[i + 2]);       }     }     if ((p[n - 2] == u && p[n - 1] == v) || (p[n - 2] == v && p[n - 1] == u)) {       swap(p[n - 3], p[n - 2]);     }     for (int i = 1; i <= n; i++) {       if (p[i] == u) {         ind1 = i;       }       if (p[i] == v) {         ind2 = i;       }     }     for (int i = 1; i <= n; i++) {       cout << p[i] <<    ;     }     cout << endl;     if (u < v) {       int s = ind1;       while (s >= 1) {         cout << p[s] <<    ;         s--;       }       s = ind1 + 1;       while (s < ind2) {         cout << p[s] <<    ;         s++;       }       s = n;       while (s >= ind2) {         cout << p[s] <<    ;         s--;       }     } else {       int s = ind1;       while (s <= n) {         cout << p[s] <<    ;         s++;       }       s = ind1 - 1;       while (s > ind2) {         cout << p[s] <<    ;         s--;       }       s = 1;       while (s <= ind2) {         cout << p[s] <<    ;         s++;       }     }     return 0;   }   