#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
int n, m, u, v, cnt, root, a[N], vis[N];
int Ecnt, first[N], nex[N], arr[N];
vector<int> g[N], ans;
inline int add(int u, int v) {
  nex[++Ecnt] = first[u], first[u] = Ecnt, arr[Ecnt] = v;
}
void dfs(int u) {
  cnt -= a[u];
  vis[u] = 1;
  for (int i = 0, v; i < (int)g[u].size(); ++i) {
    v = g[u][i];
    if (vis[v]) continue;
    add(u, v);
    dfs(v);
  }
}
void Dfs(int u, int fa = 0) {
  ans.push_back(u), a[u] ^= 1;
  for (int i = first[u], v; i; i = nex[i]) {
    v = arr[i];
    if (v == fa) continue;
    Dfs(v, u);
    ans.push_back(u), a[u] ^= 1;
    if (a[v]) {
      ans.push_back(v), a[v] ^= 1;
      ans.push_back(u), a[u] ^= 1;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &u, &v);
    g[u].push_back(v), g[v].push_back(u);
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    cnt += a[i];
    if (a[i] & 1) root = i;
  }
  dfs(root);
  if (cnt) return 0 * printf("-1\n");
  Dfs(root);
  if (a[root]) {
    reverse(ans.begin(), ans.end());
    ans.pop_back();
    reverse(ans.begin(), ans.end());
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < (int)ans.size(); ++i) printf("%d ", ans[i]);
  return 0;
}
