#include <bits/stdc++.h>
int odd[100007];
int tot, out[100007 << 2];
int et, eHead[100007];
struct Edge {
  int t, next;
} e[100007 << 1];
inline void addEdge(int u, int v) {
  e[et].t = v, e[et].next = eHead[u], eHead[u] = et++;
}
int n, m, r;
bool vis[100007];
void dfs(int v, int p = -1) {
  vis[v] = true;
  odd[v] ^= 1;
  out[tot++] = v;
  int i;
  for (i = eHead[v]; i != -1; i = e[i].next)
    if (!vis[e[i].t]) {
      dfs(e[i].t, v);
      odd[v] ^= 1;
      out[tot++] = v;
    }
  if (odd[v] && p != -1) {
    odd[p] ^= 1;
    out[tot++] = p;
    odd[v] ^= 1;
    out[tot++] = v;
  }
}
int main() {
  int i, x, y;
  scanf("%d%d", &n, &m);
  et = 0, memset(eHead, -1, sizeof(eHead));
  for (i = 0; i < m; ++i) {
    scanf("%d%d", &x, &y);
    addEdge(x, y), addEdge(y, x);
  }
  for (i = 1; i <= n; ++i) {
    scanf("%d", &odd[i]);
    if (odd[i]) {
      r = i;
    }
  }
  tot = 0;
  memset(vis, false, sizeof(vis));
  dfs(r);
  bool flag = true;
  for (i = 1; i <= n; ++i)
    if (i != r && odd[i]) {
      flag = false;
      break;
    }
  if (flag) {
    printf("%d\n", tot - odd[r]);
    for (i = 0; i < tot - odd[r]; ++i) printf("%d ", out[i]);
  } else {
    printf("-1");
  }
  return 0;
}

### Prompt

In CPP, your task is to solve the following problem:

Twilight Sparkle learnt that the evil Nightmare Moon would return during the upcoming Summer Sun Celebration after one thousand years of imprisonment on the moon. She tried to warn her mentor Princess Celestia, but the princess ignored her and sent her to Ponyville to check on the preparations for the celebration.

<image>

Twilight Sparkle wanted to track the path of Nightmare Moon. Unfortunately, she didn't know the exact path. What she knew is the parity of the number of times that each place Nightmare Moon visited. Can you help Twilight Sparkle to restore any path that is consistent with this information?

Ponyville can be represented as an undirected graph (vertices are places, edges are roads between places) without self-loops and multi-edges. The path can start and end at any place (also it can be empty). Each place can be visited multiple times. The path must not visit more than 4n places.

Input

The first line contains two integers n and m (2 ≤ n ≤ 105; 0 ≤ m ≤ 105) — the number of places and the number of roads in Ponyville. Each of the following m lines contains two integers ui, vi (1 ≤ ui, vi ≤ n; ui ≠ vi), these integers describe a road between places ui and vi.

The next line contains n integers: x1, x2, ..., xn (0 ≤ xi ≤ 1) — the parity of the number of times that each place must be visited. If xi = 0, then the i-th place must be visited even number of times, else it must be visited odd number of times.

Output

Output the number of visited places k in the first line (0 ≤ k ≤ 4n). Then output k integers — the numbers of places in the order of path. If xi = 0, then the i-th place must appear in the path even number of times, else i-th place must appear in the path odd number of times. Note, that given road system has no self-loops, therefore any two neighbouring places in the path must be distinct.

If there is no required path, output -1. If there multiple possible paths, you can output any of them.

Examples

Input

3 2
1 2
2 3
1 1 1


Output

3
1 2 3


Input

5 7
1 2
1 3
1 4
1 5
3 4
3 5
4 5
0 1 0 1 0


Output

10
2 1 3 4 5 4 5 4 3 1 

Input

2 0
0 0


Output

0

### Response

```cpp
#include <bits/stdc++.h>
int odd[100007];
int tot, out[100007 << 2];
int et, eHead[100007];
struct Edge {
  int t, next;
} e[100007 << 1];
inline void addEdge(int u, int v) {
  e[et].t = v, e[et].next = eHead[u], eHead[u] = et++;
}
int n, m, r;
bool vis[100007];
void dfs(int v, int p = -1) {
  vis[v] = true;
  odd[v] ^= 1;
  out[tot++] = v;
  int i;
  for (i = eHead[v]; i != -1; i = e[i].next)
    if (!vis[e[i].t]) {
      dfs(e[i].t, v);
      odd[v] ^= 1;
      out[tot++] = v;
    }
  if (odd[v] && p != -1) {
    odd[p] ^= 1;
    out[tot++] = p;
    odd[v] ^= 1;
    out[tot++] = v;
  }
}
int main() {
  int i, x, y;
  scanf("%d%d", &n, &m);
  et = 0, memset(eHead, -1, sizeof(eHead));
  for (i = 0; i < m; ++i) {
    scanf("%d%d", &x, &y);
    addEdge(x, y), addEdge(y, x);
  }
  for (i = 1; i <= n; ++i) {
    scanf("%d", &odd[i]);
    if (odd[i]) {
      r = i;
    }
  }
  tot = 0;
  memset(vis, false, sizeof(vis));
  dfs(r);
  bool flag = true;
  for (i = 1; i <= n; ++i)
    if (i != r && odd[i]) {
      flag = false;
      break;
    }
  if (flag) {
    printf("%d\n", tot - odd[r]);
    for (i = 0; i < tot - odd[r]; ++i) printf("%d ", out[i]);
  } else {
    printf("-1");
  }
  return 0;
}

```