func_code_string: #include <bits/stdc++.h>   using namespace std;   const int max_n = 1e5 + 5;   vector<int> g[max_n], path;   bool vis[max_n], x[max_n];   int s;   void dfs(int u) {     vis[u] = 1;     x[u] ^= 1;     path.push_back(u);     bool leaf = 1;     for (int v : g[u]) {       if (!vis[v]) {         if (!leaf) leaf = 0;         dfs(v);         x[u] ^= 1;         path.push_back(u);         if (x[v]) {           x[v] ^= 1;           path.push_back(v);           x[u] ^= 1;           path.push_back(u);         }       }     }     if (u == s && x[u]) {       x[u] ^= 1;       path.pop_back();     }   }   int main() {     int n, m;     scanf( %d%d , &n, &m);     while (m--) {       int u, v;       scanf( %d%d , &u, &v);       g[u].push_back(v);       g[v].push_back(u);     }     s = -1;     for (int i = 1; i <= n; i++) {       scanf( %d , &x[i]);       if (s == -1 && x[i]) s = i;     }     if (s != -1) dfs(s);     bool ok = 1;     for (int i = 1; i <= n; i++) {       if (x[i]) {         ok = 0;         break;       }     }     if (!ok) {       puts( -1 );       exit(0);     }     int sz = path.size();     printf( %d n , sz);     for (int i = 0; i < sz; i++) {       if (i != sz - 1)         printf( %d  , path[i]);       else         printf( %d n , path[i]);     }     return 0;   }   