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

n = int(input())

tree = [{'value': 0, 'children': [], 'idx': i} for i in range(n)] 

for i in range(n-1):
    edge_input = input().split()
    tree[int(edge_input[1]) - 1]['children'].append(int(edge_input[0]) - 1)


initial_vals = [int(x) for x in input().split()]
goal_vals = [int(x) for x in input().split()]

for i in range(len(initial_vals)):
    tree[i]['value'] = initial_vals[i]
    tree[i]['target_value'] = goal_vals[i]

for node in tree:
    node['real_children'] = []
    for child_idx in node['children']:
         node['real_children'] += tree[child_idx]['children']

flipper = str.maketrans('10', '01')
# 
# def findMoves(root_node):
#     current_barray = ''
#     target_barray = ''
#     node_idx_lookup = []
#     
#     flips = []
#     
#     stack = [root_node]
#     
#     while stack:
#         node = stack.pop()
#         current_barray += str(node['value'])
#         target_barray += str(node['target_value'])
#         node_idx_lookup.append(node['idx'])
#         for child_idx in node['children']:
#             for real_child_idx in tree[child_idx]['children']:
#                 stack.append(tree[real_child_idx])
#     
#     print(current_barray)
#     print(target_barray)
#     
#     for i in range(len(current_barray)):
#         if current_barray[i] != target_barray[i]:
#             flips.append(node_idx_lookup[i])
#             current_barray = current_barray[:i] + current_barray[i:].translate(flipper)
#     
#     return flips
#         
#         
# 110101
# 111010
# 111001
# 
# 111100
# 
# print(findMoves(tree[0]))

# stack = [tree[0]]
# current_barray = []
# target_barray = []
# string_pos_to_idx_lookup = []
# while stack:
#     node = stack.pop()
#     current_barray.append(node['value'])
#     target_barray.append(node['target_value'])
#     string_pos_to_idx_lookup.append(node["idx"])
#     stack += [tree[idx] for idx in node['real_children']]
# 
# print(current_barray)
# print(target_barray)
# 
# for i in range(len(current_barray)):
#     if current_barray[i] ! = 
 
def flip(node):
    stack = [node]
    while stack:
        n = stack.pop()
        n['value'] =  (n['value']  + 1) % 2
        stack += [tree[idx] for idx in n['real_children']]
     
     
flips = []
# 2 Start points are root node and the children of the root node
stack = [(tree[0], 0)] + [(tree[idx], 0) for idx in tree[0]['children']]
while stack:
    entry = stack.pop()
    
    node = entry[0]
    flipCount = entry[1]
    
    if flipCount % 2 == 0 and node['value'] != node['target_value'] or flipCount % 2 == 1 and node['value'] == node['target_value']:
#         print('flipping ' + str(node['idx']))
        flips.append(node['idx'])
        stack += [(tree[idx], flipCount + 1) for idx in node['real_children']]
    else:
        stack += [(tree[idx], flipCount) for idx in node['real_children']]
     
print(len(flips))
for f in flips:
    print(f + 1)


# print(tree)