454_E. 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
"""
Codeforces Contest 259 Div 1 Problem C

Author  : chaotic_iak
Language: Python 3.3.4
"""

def main():

    # Read N and M from problem statement.
    n,m = read()

    # Set up an adjacency list for each vertex.
    edges = [[] for _ in range(n+1)]
    for i in range(m):
        a,b = read()
        edges[a].append(b)
        edges[b].append(a)

    # Read the parity array. Pad with 0 at the front to make it 1-based like in problem.
    parity = [0] + read()

    # Find odd vertex with minimum index.
    mn = 0
    while mn < n+1 and not parity[mn]: mn += 1

    # If none, then no need to output anything.
    if mn == n+1:
        print(0)
        return

    # Create the visited array, stack for DFS, and list to store the resulting path.
    visited = [0] * (n+1)
    dfs_stack = [mn]
    dfs_path = []

    # Call one step of DFS as long as the stack is not empty. (See below.)
    while dfs_stack: dfs(dfs_stack, dfs_path, visited, edges, parity)

    # If the root is odd, remove the last element of the path.
    if parity[mn]:
        dfs_path.pop()
        parity[mn] = 0

    # If there's still an odd vertex, then we have two separate components with
    # odd vertices; we failed.
    if sum(parity):
        print(-1)

    # Otherwise, print the resulting path.
    else:
        print(len(dfs_path))
        print(" ".join(map(str, dfs_path)))

def dfs(dfs_stack, dfs_path, visited, edges, parity):

    # Take top element of the stack. This is positive if it's a downward edge (away
    # from root) and negative if it's an upward edge (to root), and its absolute
    # value is the index of the destination vertex.
    v = dfs_stack.pop()

    # If a downward edge:
    if v > 0:

        # If target vertex has been visited, no need to visit it again. Pop the
        # top item of the stack (which is a return edge for this vertex, but unused).
        if visited[v]:
            dfs_stack.pop()
            return

        # Set current vertex as visited and append it to path. Toggle the parity.
        visited[v] = 1
        dfs_path.append(v)
        parity[v] = 1 - parity[v]

        # Add a pair of downward/upward edges for each neighbor of this vertex.
        for i in edges[v]:
            dfs_stack.append(-v)
            dfs_stack.append(i)

    # If an upward edge:
    else:

        # Set v as absolute value. Take the child just visited, u, which is stored as
        # the last element of final path. Append the current vertex v to final path
        # and toggle the parity of v.
        v = -v
        u = dfs_path[-1]
        dfs_path.append(v)
        parity[v] = 1 - parity[v]

        # If u is odd, visit u and return back to v one more time. This toggles the
        # parity of u but not v.
        if parity[u]:
            dfs_path.append(u)
            dfs_path.append(v)
            parity[u] = 1 - parity[u]
            parity[v] = 1 - parity[v]

        # If u is even, we don't need to do anything.
        else:
            pass

################################### NON-SOLUTION STUFF BELOW

def read(mode=2):
    # 0: String
    # 1: List of strings
    # 2: List of integers
    inputs = input().strip()
    if mode == 0: return inputs
    if mode == 1: return inputs.split()
    if mode == 2: return list(map(int, inputs.split()))

def read_str(): return read(0)
def read_int(): return read(2)[0]

def write(s="\n"):
    if isinstance(s, list): s = " ".join(map(str, s))
    s = str(s)
    print(s, end="")

main()
```