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 initi, 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 goali, which can also be only 0 or 1. You need to reach the goal of the game by using minimum number of operations.

Input

The first line contains an integer n (1 ≤ n ≤ 105). Each of the next n - 1 lines contains two integers ui and vi (1 ≤ ui, vi ≤ n; ui ≠ vi) meaning there is an edge between nodes ui and vi. 

The next line contains n integer numbers, the i-th of them corresponds to initi (initi is either 0 or 1). The following line also contains n integer numbers, the i-th number corresponds to goali (goali is either 0 or 1).

Output

In the first line output an integer number cnt, representing the minimal number of operations you perform. Each of the next cnt lines should contain an integer xi, representing that you pick a node xi.

Examples

Input

10
2 1
3 1
4 2
5 1
6 2
7 5
8 6
9 8
10 5
1 0 1 1 0 1 0 1 0 1
1 0 1 0 0 1 1 1 0 1


Output

2
4
7

Difficulty: EASY

Solutions:
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import insort, bisect_right, bisect_left
import threading, sys

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

	def dfs(s, p):
		if visited[s]:
			return
		visited[s] = 1
		par[p].append(s)
		for i in adj[s]:
			dfs(i, s)
	dfs(0, 0)
	par[0] = par[0][1:]
	ans = []

	def dfs2(s, l, fo, fe):
		if l % 2 == 0:
			if fe % 2 == 1:
				init[s] = 1 - init[s]
		elif fo % 2 == 1:
			init[s] = 1 - init[s]
		if init[s] != goal[s]:
			ans.append(s + 1)
			if l % 2:
				fo += 1
			else:
				fe += 1
		for j in par[s]:
			dfs2(j, l + 1, fo, fe)
	dfs2(0, 0, 0, 0)
	print(len(ans))
	print('\n'.join(map(str, ans)))
sys.setrecursionlimit(400000)
threading.stack_size(102400000)
thread = threading.Thread(target=main)
thread.start()


from sys import setrecursionlimit
import threading
setrecursionlimit(10 ** 9)
threading.stack_size(67108864)

def dfs(u):
	global al, used, parent
	for i in al[u]:
		if not used[i]:
			used[i] = True
			parent[i] = u
			dfs(i)

def fill(i):
	global parent, al, used, init, goal, changed, cnt, res
	if i == 0 or parent[i] == 0:
		changed[i] = 0
	else:
		changed[i] = changed[parent[parent[i]]]
	if changed[i] % 2 == 1:
		cur = 1 - init[i]
	else:
		cur = init[i]
	if cur != goal[i]:
		changed[i] += 1
		changed[i] %= 2
		cnt += 1
		res.append(i)
	for u in al[i]:
		if parent[i] != u:
			fill(u)

def main():
	global parent, al, used, init, goal, changed, cnt, res
	n = int(input())
	al = [[] for i in range(n)]
	for i in range(n - 1):
		(a, b) = [int(j) - 1 for j in input().split()]
		al[a].append(b)
		al[b].append(a)
	used = [False] * n
	parent = [-1] * n
	used[0] = True
	dfs(0)
	init = [int(i) for i in input().split()]
	goal = [int(i) for i in input().split()]
	changed = [0] * n
	used = [False] * n
	cnt = 0
	res = []
	fill(0)
	print(cnt)
	for i in res:
		print(i + 1)
thread = threading.Thread(target=main)
thread.start()


from collections import Counter, deque
import string
import bisect
import math
import sys, threading
sys.setrecursionlimit(10 ** 9)
threading.stack_size(10 ** 8)
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
ans = 0

def solve():

	def bfs(node):
		dq = deque()
		dq.append(node)
		visited[node] = 1
		level[node] = 1
		while len(dq) > 0:
			node = dq.popleft()
			visited[node] = 1
			for i in tree[node]:
				if visited[i] == 0:
					level[i] = level[node] + 1
					visited[i] = 1
					dq.append(i)

	def dfs(node, level, even, odd):
		global ans
		visited[node] = 1
		if level[node] % 2:
			if (initial[node] + odd) % 2 == final[node]:
				pass
			else:
				ans += 1
				odd += 1
				pt.append(node)
		elif (initial[node] + even) % 2 == final[node]:
			pass
		else:
			ans += 1
			even += 1
			pt.append(node)
		for i in tree[node]:
			if visited[i] == 0:
				dfs(i, level, even, odd)
	testcases = 1
	for _ in range(testcases):
		n = vary(1)
		tree = [[] for i in range(n + 1)]
		for _ in range(n - 1):
			(u, v) = vary(2)
			tree[u].append(v)
			tree[v].append(u)
		initial = [44] + array_int()
		final = [55] + array_int()
		visited = [0] * (n + 1)
		level = [0] * (n + 1)
		bfs(1)
		visited = [0] * (n + 1)
		pt = []
		dfs(1, level, 0, 0)
		print(ans)
		for i in range(ans):
			print(pt[i])
threading.Thread(target=solve).start()


import sys
inp = sys.stdin.buffer.readline
inar = lambda : list(map(int, inp().split()))
inin = lambda : int(inp())
inst = lambda : inp().decode().rstrip('\n\r')
from types import GeneratorType

def recursive(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
counter = 0
init = []
goal = []
flip = []
ans = []

@recursive
def dfs(gr, node):
	global init, goal, counter, flip, parent, flip, ans
	if node != 0 and node not in gr[0]:
		flip[node] = flip[parent[parent[node]]]
	init[node] ^= flip[node]
	if init[node] != goal[node]:
		init[node] = goal[node]
		flip[node] ^= 1
		counter += 1
		ans.append(node + 1)
	for i in gr[node]:
		if i != parent[node]:
			parent[i] = node
			yield dfs(gr, i)
	yield
_T_ = 1
for _t_ in range(_T_):
	n = inin()
	counter = 0
	graph = [[] for i in range(n)]
	for i in range(n - 1):
		(u, v) = inar()
		graph[u - 1].append(v - 1)
		graph[v - 1].append(u - 1)
	flip = [0 for i in range(n)]
	parent = [-1 for i in range(n)]
	init = inar()
	goal = inar()
	dfs(graph, 0)
	print(counter)
	for i in ans:
		print(i)


import sys
import threading
for test in range(1):
	n = int(input())
	global adj
	adj = list(([] 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)
	cur = [0] + list(map(int, input().split()))
	tobe = [0] + list(map(int, input().split()))
	ans = 0
	op = []

	def dfs(node, par=-1, par_changes=0, gpar_changes=0):
		if gpar_changes % 2:
			cur[node] ^= 1
		if cur[node] != tobe[node]:
			cur[node] ^= 1
			global ans
			ans += 1
			global op
			op.append(node)
			gpar_changes += 1
		for child in adj[node]:
			if child == par:
				continue
			dfs(child, node, gpar_changes, par_changes)

def main():
	dfs(1)
	print(ans)
	for i in op:
		print(i)
sys.setrecursionlimit(10 ** 6)
threading.stack_size(10 ** 8)
t = threading.Thread(target=main)
t.start()
t.join()


import sys
import threading
from collections import defaultdict
ans = 0
li = []
n = int(input())
adj = defaultdict(list)
for _ in range(n - 1):
	(x, y) = list(map(int, input().split()))
	adj[y].append(x)
	adj[x].append(y)
inite = list(map(int, input().split()))
finale = list(map(int, input().split()))

def fun(root, par, ab1, ab2):
	global ans
	if ab2 & 1 and inite[root - 1] == finale[root - 1]:
		ans += 1
		li.append(root)
		ab2 += 1
	elif not ab2 & 1 and inite[root - 1] != finale[root - 1]:
		ans += 1
		li.append(root)
		ab2 += 1
	for ch in adj[root]:
		if ch != par:
			fun(ch, root, ab2, ab1)

def main():
	fun(1, 0, 0, 0)
	print(ans)
	for i in li:
		print(i)
sys.setrecursionlimit(10 ** 6)
threading.stack_size(10 ** 8)
t = threading.Thread(target=main)
t.start()
t.join()


import sys
(_ord, inp, num, neg, _Index) = (lambda x: x, [], 0, False, 0)
(i, s) = (0, sys.stdin.buffer.read())
try:
	while True:
		if s[i] >= b'0'[0]:
			num = 10 * num + _ord(s[i]) - 48
		elif s[i] == b'-'[0]:
			neg = True
		elif s[i] != b'\r'[0]:
			inp.append(-num if neg else num)
			(num, neg) = (0, False)
		i += 1
except IndexError:
	pass
if s and s[-1] >= b'0'[0]:
	inp.append(-num if neg else num)

def inin(size=None):
	global _Index
	if size == None:
		ni = _Index
		_Index += 1
		return inp[ni]
	else:
		ni = _Index
		_Index += size
		return inp[ni:ni + size]
from types import GeneratorType

def recursive(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
counter = 0
init = []
goal = []
flip = []
ans = []

@recursive
def dfs(gr, node):
	global init, goal, counter, flip, parent, flip, ans
	if node != 0 and node not in gr[0]:
		flip[node] = flip[parent[parent[node]]]
	init[node] ^= flip[node]
	if init[node] != goal[node]:
		init[node] = goal[node]
		flip[node] ^= 1
		counter += 1
		ans.append(node + 1)
	for i in gr[node]:
		if i != parent[node]:
			parent[i] = node
			yield dfs(gr, i)
	yield
_T_ = 1
for _t_ in range(_T_):
	n = inin()
	counter = 0
	graph = [[] for i in range(n)]
	for i in range(n - 1):
		(u, v) = inin(2)
		graph[u - 1].append(v - 1)
		graph[v - 1].append(u - 1)
	flip = [0 for i in range(n)]
	parent = [-1 for i in range(n)]
	init = inin(n)
	goal = inin(n)
	dfs(graph, 0)
	print(counter)
	for i in ans:
		print(i)


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
inp = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
inar = lambda : list(map(int, inp().split()))
inin = lambda : int(inp())
inst = lambda : inp().decode().rstrip('\n\r')
from types import GeneratorType

def recursive(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
counter = 0
init = []
goal = []
flip = []
ans = []

@recursive
def dfs(gr, node):
	global init, goal, counter, flip, parent, flip, ans
	if node != 0 and node not in gr[0]:
		flip[node] = flip[parent[parent[node]]]
	init[node] ^= flip[node]
	if init[node] != goal[node]:
		init[node] = goal[node]
		flip[node] ^= 1
		counter += 1
		ans.append(node + 1)
	for i in gr[node]:
		if i != parent[node]:
			parent[i] = node
			yield dfs(gr, i)
	yield
_T_ = 1
for _t_ in range(_T_):
	n = inin()
	counter = 0
	graph = [[] for i in range(n)]
	for i in range(n - 1):
		(u, v) = inar()
		graph[u - 1].append(v - 1)
		graph[v - 1].append(u - 1)
	flip = [0 for i in range(n)]
	parent = [-1 for i in range(n)]
	init = inar()
	goal = inar()
	dfs(graph, 0)
	print(counter)
	for i in ans:
		print(i)


import sys
import threading
from collections import defaultdict
n = int(input())
adj = defaultdict(list)
for i in range(n - 1):
	(x, y) = map(int, input().split())
	adj[x].append(y)
	adj[y].append(x)
intial = list(map(int, input().split()))
target = list(map(int, input().split()))
flip_node = []
global count
count = 0
grand_flag = False

def dfs(node, par, parentFlip, grandParentFlip):
	grand_flag = False
	if intial[node - 1] != target[node - 1]:
		if grandParentFlip % 2 == 0:
			flip_node.append(node)
			grand_flag = True
	elif grandParentFlip % 2 != 0:
		flip_node.append(node)
		grand_flag = True
	for i in range(len(adj[node])):
		if adj[node][i] != par:
			if grand_flag:
				dfs(adj[node][i], node, grandParentFlip + 1, parentFlip)
			else:
				dfs(adj[node][i], node, grandParentFlip, parentFlip)

def main():
	par = 0
	grandParentFlip = 0
	parentFlip = 0
	grand_flip = False
	dfs(1, par, parentFlip, grandParentFlip)
	print(len(flip_node))
	for i in flip_node:
		print(i, end='\n')
sys.setrecursionlimit(10 ** 6)
threading.stack_size(10 ** 8)
t = threading.Thread(target=main)
t.start()
t.join()