func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, viz[100005], cnt, nr, x[100005], nrans, ans[400005], rad;   vector<int> v[100005];   void dfs1(int nod) {     viz[nod] = 1;     nr += x[nod];     for (auto x : v[nod])       if (!viz[x]) dfs1(x);   }   void dfs(int nod, int tata) {     viz[nod] = 1;     nrans++;     ans[nrans] = nod;     x[nod] = 1 - x[nod];     for (auto xx : v[nod])       if (!viz[xx]) {         dfs(xx, nod);         nrans++;         ans[nrans] = nod;         x[nod] = 1 - x[nod];       }     if ((x[nod] % 2) && (nod != rad)) {       nrans++;       ans[nrans] = tata;       nrans++;       ans[nrans] = nod;       x[nod] = 1 - x[nod];       x[tata] = 1 - x[tata];     }   }   int main() {     int i, xx, y;     cin >> n >> m;     for (i = 1; i <= m; i++) {       cin >> xx >> y;       v[xx].push_back(y);       v[y].push_back(xx);     }     for (i = 1; i <= n; i++) cin >> x[i];     for (i = 1; i <= n; i++)       if (!viz[i]) {         nr = 0;         dfs1(i);         if (nr % 2) cnt++;         if (cnt > 1) {           cout << -1;           return 0;         }       }     for (i = 1; i <= n; i++) viz[i] = 0;     for (i = 1; i <= n; i++)       if (x[i] % 2) {         rad = i;         break;       }     if (!rad) rad = 1;     dfs(rad, 0);     if (x[rad] % 2) nrans--;     cout << nrans <<   n ;     for (i = 1; i <= nrans; i++) cout << ans[i] <<    ;     return 0;   }   