Problem: 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

Solution (in JAVA):

Solution:
//package leetcode;


import java.util.*;
import java.lang.*;
import java.io.*;


public class Codechef
{
	public static int [][] G;
	public static int odd;
	public static int even;
	public static int [] init;
	public static int [] height;
	public static int [] goal;
	public static int sum;
	public static String [] color;
	public static Queue<Integer> qu;
	
	public Codechef(int v) {
		qu = new LinkedList<>(); 
		odd = 0;
		even = 0;
		G = new int[v][];
		sum = 0;
		color = new String[v];
		Arrays.fill(color,"WHITE");
		height = new int[v];
		init = new int[v];
		goal = new int[v];
	}
	
	void DFS_Visit(int u)
	{
		int flag1 = 0;
		int flag2 = 0;
		if(height[u]%2==0) {
			if(even==0 & init[u]!=goal[u]) {
				sum+=1;
				qu.add(u);
				even = 1;
				flag1 = 1;
			}else if(even==1 & (init[u] ^ 1)!=goal[u]) {
				sum+=1;
				qu.add(u);
				even = 0;
				flag1 = 1;
			}
		}else {
			if(odd==0 & init[u]!=goal[u]) {
				sum+=1;
				qu.add(u);
				odd = 1;
				flag2 = 1;
			}else if(odd==1 & (init[u] ^ 1)!=goal[u]) {
				sum+=1;
				qu.add(u);
				odd = 0;
				flag2 = 1;
			}
		}
		
		color[u] = "GREY";
		for(int v :G[u])
		{
			if(color[v] == "WHITE")
			{
				height[v]+=height[u]+1;
				DFS_Visit(v);
			}
		}
		//System.out.println(sum+"sum");
		color[u] = "BLACK";
		if(flag1==1) {
			even = (even^1);
		}
		if(flag2==1) {
			odd = odd^1;
		}
	}
	
	
	
	
	public static void main (String[] args) throws java.lang.Exception
	{ 
		PriorityQueue<Integer> pQueue = new PriorityQueue<Integer>(); 
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is); 
		int n = Integer.parseInt(br.readLine());
		Codechef g = new Codechef(n+1);
		int[] to = new int[n-1];
		int[] from = new int[n-1];
		int[] p = new int[n+1];
		for(int i =0;i<n-1;i++) {
			String [] s = br.readLine().split(" ");
			from[i] = Integer.parseInt(s[0]);
			to[i] = Integer.parseInt(s[1]);
			p[from[i]]++;
			p[to[i]]++;
		}
		String[] ab = br.readLine().split(" ");
		String[] cd = br.readLine().split(" ");
		for(int i =1;i<n+1;i++) {
			init[i] = Integer.parseInt(ab[i-1]);
		}
		for(int i =1;i<n+1;i++) {
			goal[i] = Integer.parseInt(cd[i-1]);
		}
		
		for(int i =0;i<n+1;i++) {
			G[i] = new int[p[i]];
		}
		for (int i = 0; i < n-1; i++) {
			G[from[i]][--p[from[i]]] = to[i];
			G[to[i]][--p[to[i]]] = from[i];
		}
		height[1] = 1;
		g.DFS_Visit(1);
		System.out.println(sum);
		int size = qu.size();
		for(int i =0;i<size;i++) {
			System.out.println(qu.poll());
		}
		
	} 
	
}