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).
import fileinput

odd_change = 0
even_change = 0

class Node:
    def __init__(self, id, value):
    	self.id = id
    	self.children = []
    	self.value = value
    	self.odd_change = 0
    	self.even_change = 0
    	self.is_odd = True

    def add_child(self, child):
    	# print child
    	self.children.append(child)

    def try_flip(self, target):
    	rv = False
    	# print str(self.id) + " " + str(self.even_change) + " " + str(self.odd_change)

    	if not self.is_odd and self.even_change % 2 != 0:
    		self.flip_value()
    	elif self.is_odd and self.odd_change % 2 != 0:
    		self.flip_value()
    	if not (int(self.value) == int(target)):
    		self.flip_value()
    		if not self.is_odd:
    			self.even_change = self.even_change + 1
    		else:
    			self.odd_change = self.odd_change + 1
    		rv = True

    	for c in self.children:
    			c.odd_change = self.odd_change
    			c.even_change = self.even_change

    	return rv

    def flip_value(self):
    	if int(self.value) == 1:
    		self.value = 0
    	else:
    		self.value = 1

    def __repr__(self):
    	# return str(self.id) + " " + str(self.value) + " " + str(self.is_odd)
    	return str(self.value)

full_input = fileinput.input()

n = int(full_input[0])

nodes = {}

for i in range(n):
	nodes[i + 1] = Node(i + 1, 0)

for i in range(n - 1):
	edge = full_input[i + 1].rstrip().split(' ')
	# print "here"
	# print int(edge[0])
	parent = int(edge[1])
	child = int(edge[0])
	nodes[parent].add_child(nodes[child])
	if nodes[parent].is_odd:
		nodes[child].is_odd = False
	else:
		nodes[child].is_odd = True

orig = full_input[n].rstrip().split(' ')
for i in range(n):
	nodes[i + 1].value = orig[i]


# string = bytearray()
switches = []
cnt = 0

target = full_input[n+1].rstrip().split(' ')
for i in range(n):
	# print nodes
	# print str(nodes[i + 1]) + " " + str(target[i])
	if nodes[i + 1].try_flip(target[i]):
		# print i + 1
		# print nodes
		# print ""
		value = str(i + 1)
		# string.extend(value)
		# string.extend("\n")
		switches.append(i + 1)
		cnt = cnt +  1

# print nodes

print(cnt)
# print switches

# print "\n".join(str(x) for x in switches)
# print(string)
for v in switches:
	print(v)


