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 bisect
import math
from collections import deque
import heapq
import functools
from queue import Queue
from collections import defaultdict
from pprint import pprint

mod =  998244353 
N = 200005

def mul(a, b):
	return (a*b)%mod

def add(a, b):
	return (a+b) if (a+b<mod) else (a+b)-mod

def sub(a, b):
	return (a-b) if (a-b>=0) else (a-b)+mod

def powr(a, b):
	ans = 1
	while b>0:
		if b & 1:
			ans=mul(ans,a)
		a = mul(a,a) 
		b//=2
	return ans

def inv(n):
	return powr(n, mod-2)

def factlist():
	fact = [1]
	for i in range(1, N):
		fact.append(mul(fact[i-1],i))
	return fact

def invfactlist(fact):
	invfact=[0]*N
	invfact[0]=1
	invfact[N-1]= inv(fact[N-1])
	for i in range(N-2, 0, -1):
		invfact[i]= mul(invfact[i+1],(i+1))
	
	return invfact

def rot(S):
	return list(zip(*S[::-1]))

def gcd(a, b):
	if b==0:
		return a
	return gcd(b, a%b)

def generate():
	ans = [0]
	while ans[-1]<1000000000:
		ans.append(1+ans[-1]*2)
	return ans


def dfs(node, vis, curturn, con, ans, cnt):
	if ans[node]==1:
		return ans[node]
	turn = [curturn]
	for i in con[node]:
		if not i in vis:
			vis.add(i)
			turn.append(dfs(i, vis, curturn+1, con, ans, cnt)+1)
	else:
		if cnt[node]<=2:
			ans[node] = sorted(turn)[0]
		else:
			ans[node] = sorted(turn)[1]
	return ans[node]


def main():
	n=int(input())
	adj=[[] for i in range(n+1)]
	for i in range(n-1):
		a,b=map(int,input().split())
		adj[a].append(b)
		adj[b].append(a)

	u=[-1]+list(map(int,input().split()))
	v=[-1]+list(map(int,input().split()))

	q=[(1,0,0,0)]
	ans=[]
	while q:
		x,a,b,c=q.pop()
		if a:
			if b!=(u[x]^v[x]):
				ans.append(x)
				b=1^b
		else:
			if c!=(u[x]^v[x]):
				ans.append(x)
				c=1^c
		a=1^a
		for i in adj[x]:
			adj[i].remove(x)
			q.append((i,a,b,c))
	print(len(ans))
	print('\n'.join(map(str,ans)))






if __name__ == "__main__":
    main()
    
	