453_C. Little Pony and Summer Sun Celebration
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
```python
import sys
readline = sys.stdin.readline

N, M = map(int, readline().split())
Edge = [[] for _ in range(N)]
for _ in range(M):
    u, v = map(int, readline().split())
    u -= 1
    v -= 1
    Edge[u].append(v)
    Edge[v].append(u)
Pr = list(map(int, readline().split()))
Po = Pr[:]

if sum(Pr) == 0:
    print(0)
else:
    st = Pr.index(1)
    stack = [~st, st]
    used = set([st])
    ans = []
    P = [None]*N
    pre = None
    while stack:
        vn = stack.pop()        
        if vn >= 0:
            Pr[vn] ^= 1
            ans.append(vn)
            for vf in Edge[vn]:
                if vf in used:
                    continue
                P[vf] = vn
                stack.append(~vf)
                stack.append(vf)
                used.add(vf)
        else:
            vn = ~vn
            if pre != vn:
                Pr[vn] ^= 1
                ans.append(vn)
            if vn == st:
                if Pr[vn]:
                    ans.pop()
                    Pr[vn] ^= 1
                break
            if Pr[vn]:
                ans.append(P[vn])
                ans.append(vn)
                Pr[vn] ^= 1
                Pr[P[vn]] ^= 1
            if stack and stack[-1] >= 0:
                ans.append(P[vn])
                Pr[P[vn]] ^= 1
        pre = vn
        
    for a in ans:
        Po[a] ^= 1 
    for a, b in zip(ans, ans[1:]):
        assert a != b
    if sum(Po):
        print(-1)
    else:
        print(len(ans))
        assert len(ans) <= 4*N
        print(*[a+1 for a in ans])

```