func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( Ofast )   using namespace std;   const long double eps = 1e-7;   const int inf = 1000000010;   const long long INF = 10000000000010LL;   const int mod = 1000000007;   const int MAXN = 100010;   int n, m, u, v, x, y, t, a, b, ans, node, cnt;   bool ok[MAXN];   bool mark[MAXN];   vector<int> G[MAXN];   vector<int> out;   void dfs(int node, int par) {     mark[node] = true;     cnt -= ok[node];     ok[node] ^= 1;     for (int v : G[node]) {       if (mark[v]) continue;       out.push_back(v);       dfs(v, node);       out.push_back(node);       ok[node] ^= 1;     }     if (ok[node] && par) {       out.push_back(par);       out.push_back(node);       ok[par] ^= 1;     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cin >> n >> m;     while (m--) {       cin >> u >> v;       G[u].push_back(v);       G[v].push_back(u);     }     for (int i = 1; i <= n; i++) {       cin >> ok[i];       if (ok[i]) cnt++;       if (!node && ok[i]) node = i;     }     if (!node) return cout << 0 <<   n , 0;     ;     dfs(node, 0);     if (cnt) return cout << -1 <<   n , 0;     ;     if (!ok[node])       cout << out.size() + 1 << endl << node <<    ;     else       cout << out.size() << endl;     for (int i : out) cout << i <<    ;     cout << endl;     return 0;   }   