func_code_string: #include <bits/stdc++.h>   int get() {     int x = 0;     char s = getchar();     while (s <  0  || s >  9 ) s = getchar();     while (s >=  0  && s <=  9 )       x = (x << 3) + (x << 1) + (s ^ 48), s = getchar();     return x;   }   const int M = 1e5 + 5;   int n, m, head[M], cntedge, ans, s, a[M << 2];   bool c[M], vis[M];   struct edge {     int to, nxt;     edge() {}     edge(const int T, const int NX) { to = T, nxt = NX; }   } e[M << 1];   void add(const int u, const int v) {     e[++cntedge] = edge(v, head[u]), head[u] = cntedge;   }   void dfs(int u, int fa) {     vis[u] = 1;     a[++ans] = u;     c[u] ^= 1;     for (int i = head[u]; i; i = e[i].nxt)       if (!vis[e[i].to]) {         dfs(e[i].to, u);         a[++ans] = u;         c[u] ^= 1;       }     if (c[u]) {       a[++ans] = fa;       c[fa] ^= 1;       a[++ans] = u;       c[u] ^= 1;     }   }   int main() {     n = get(), m = get();     for (int u, v; m--;) {       u = get(), v = get();       add(u, v), add(v, u);     }     for (int i = 1; i <= n; ++i) {       c[i] = get();       if (c[i]) s = i;     }     if (s) {       dfs(s, -1);       for (int i = 1; i <= n; ++i)         if (!vis[i] && c[i]) return !printf( -1 );     }     if (ans > 1 && a[ans - 1] == -1) ans -= 3;     printf( %d n , ans);     for (int i = 1; i <= ans; ++i) printf( %d  , a[i]);     return 0;   }   