Iahub is very proud of his recent discovery, propagating trees. Right now, he invented a new tree, called xor-tree. After this new revolutionary discovery, he invented a game for kids which uses xor-trees.

The game is played on a tree having *n* nodes, numbered from 1 to *n*. Each node *i* has an initial value *init*<sub class="lower-index">*i*</sub>, which is either 0 or 1. The root of the tree is node 1.

One can perform several (possibly, zero) operations on the tree during the game. The only available type of operation is to pick a node *x*. Right after someone has picked node *x*, the value of node *x* flips, the values of sons of *x* remain the same, the values of sons of sons of *x* flips, the values of sons of sons of sons of *x* remain the same and so on.

The goal of the game is to get each node *i* to have value *goal*<sub class="lower-index">*i*</sub>, which can also be only 0 or 1. You need to reach the goal of the game by using minimum number of operations.
The first line contains an integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>). Each of the next *n* - 1 lines contains two integers *u*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub> (1 ≤ *u*<sub class="lower-index">*i*</sub>, *v*<sub class="lower-index">*i*</sub> ≤ *n*; *u*<sub class="lower-index">*i*</sub> ≠ *v*<sub class="lower-index">*i*</sub>) meaning there is an edge between nodes *u*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub>. 

The next line contains *n* integer numbers, the *i*-th of them corresponds to *init*<sub class="lower-index">*i*</sub> (*init*<sub class="lower-index">*i*</sub> is either 0 or 1). The following line also contains *n* integer numbers, the *i*-th number corresponds to *goal*<sub class="lower-index">*i*</sub> (*goal*<sub class="lower-index">*i*</sub> is either 0 or 1).
from collections import deque
import sys

# function to flip a node and its descendants
def flip(node, parent, flips, adj_list, init_vals):
    init_vals[node] = 1 - init_vals[node] # flip the value of the node
    flips.append(node) # add the node to the list of flipped nodes
    for child in adj_list[node]:
        if child != parent:
            flip(child, node, flips, adj_list, init_vals) # recursively flip its descendants

# function to check if a node needs to be flipped
def needs_flip(node, parent, adj_list, init_vals, goal_vals):
    if init_vals[node] != goal_vals[node]: # node needs to be flipped
        return True
    for child in adj_list[node]:
        if child != parent:
            if needs_flip(child, node, adj_list, init_vals, goal_vals): # recursively check its descendants
                return True
    return False

# function to solve the game
def solve_game(n, adj_list, init_vals, goal_vals):
    flips = [] # list of nodes that are flipped
    queue = deque([1, None]) # breadth-first search queue, None represents the end of a level
    depth = 0 # depth of the current level
    while queue:
        node = queue.popleft()
        if node is None: # end of current level
            if not queue: # end of the game, no more nodes to flip
                return (len(flips), flips)
            depth += 1
            queue.append(None)
            continue
        if depth % 2 == 0: # even depth, check if node needs to be flipped
            if needs_flip(node, None, adj_list, init_vals, goal_vals):
                flip(node, None, flips, adj_list, init_vals)
        else: # odd depth, flip the node and its descendants
            flip(node, None, flips, adj_list, init_vals)
        for child in adj_list[node]: # add children of the node to the queue
            if child != node: # exclude the parent of the node
                queue.append(child)

# read input
n = int(sys.stdin.readline())
adj_list = [[] for _ in range(n)]
for i in range(n-1):
    u, v = map(int, sys.stdin.readline().split())
    adj_list[u-1].append(v-1)
    adj_list[v-1].append(u-1)
init_vals = list(map(int, sys.stdin.readline().split()))
goal_vals = list(map(int, sys.stdin.readline().split()))

# solve the game and write output
flips = solve_game(n, adj_list, init_vals, goal_vals)
print(flips[0])
print('\n'.join(str(x+1) for x in flips[1]))
