func_code_string: #include <bits/stdc++.h>   using namespace std;   int cur[100005];   int mark[100005];   int sol[400005];   int csol;   int n, m;   vector<int> E[100005];   inline void dfs(int u, int up) {     mark[u] = 1;     csol++;     sol[csol] = u;     cur[u] ^= 1;     int last = 0;     for (int i = 0; i < E[u].size(); i++)       if (E[u][i] != up && mark[E[u][i]] == 0) {         if (up == 0 && last != 0) {           csol++;           sol[csol] = u;           cur[u] ^= 1;         }         dfs(E[u][i], u);         last = 1;         if (up != 0) {           csol++;           sol[csol] = u;           cur[u] ^= 1;         }       }     if (cur[u])       if (up != 0) {         csol++;         sol[csol] = up;         csol++;         sol[csol] = u;         cur[u] ^= 1;         cur[up] ^= 1;       } else {         csol++;         sol[csol] = u;         cur[u] ^= 1;       }   }   int main() {     scanf( %d%d , &n, &m);     for (int i = 1; i <= m; i++) {       int p, k;       scanf( %d%d , &p, &k);       E[p].push_back(k);       E[k].push_back(p);     }     for (int i = 1; i <= n; i++) scanf( %d , &cur[i]);     int st = 0;     for (int i = 1; i <= n; i++)       if (cur[i]) st = i;     if (st == 0) {       printf( 0 n );       return 0;     }     dfs(st, 0);     int ok = 1;     for (int i = 1; i <= n; i++)       if (cur[i]) ok = 0;     if (ok) {       printf( %d n , csol);       for (int i = 1; i <= csol; i++) printf( %d  , sol[i]);     } else       printf( -1 n );   }   