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:
import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
	static class InputReader{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
 
		public InputReader(InputStream stream) {
			this.stream = stream;
		}
 
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
 
		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
 
		public String readString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
 
		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
 
		public String next() {
			return readString();
		}
 
		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}
	
 
static class OutputWriter {
		private final PrintWriter writer;
 
		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}
 
		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}
 
		public void print(Object...objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}
 
		public void printLine(Object...objects) {
			print(objects);
			writer.println();
		}
 
		public void close() {
			writer.close();
		}
 
		public void flush() {
			writer.flush();
		}
 
		}
 
    static class IOUtils {
 
		public static int[] readIntArray(InputReader in, int size) {
			int[] array = new int[size];
			for (int i = 0; i < size; i++)
				array[i] = in.readInt();
			return array;
		}
    }
    static int n, count;
    static int[] init, goal;
    static boolean[] visited;
    static ArrayList<ArrayList<Integer>> lists;
    static int mod = 1000000007;
    static OutputWriter out;
    static InputReader in;
    static ArrayList<Integer> abc;
    public static void main (String[] args) throws java.lang.Exception
	{
	    out = new OutputWriter(System.out);
		in = new InputReader(System.in);
	    n = in.readInt();
	    abc = new ArrayList<Integer>();
	    lists = new ArrayList<ArrayList<Integer>>();
	    for(int i=0; i<=n; i++)lists.add(new ArrayList<Integer>());
	    for(int i=1; i<n; i++){
	        int u = in.readInt();
	        int v = in.readInt();
	        lists.get(u).add(v);
	        lists.get(v).add(u);
	    }
	    count = 0;
	    init = new int[n+1];
	    goal = new int[n+1];
	    visited = new boolean[n+1];
	    for(int i=1; i<=n; i++)init[i] = in.readInt();
	    for(int i=1; i<=n; i++)goal[i] = in.readInt();
	    Queue<Integer> q1 = new LinkedList<Integer>();
	    Queue<Integer> q2 = new LinkedList<Integer>();
	    Queue<Integer> q3 = new LinkedList<Integer>();
	    q1.add(1); q2.add(0); q3.add(0); visited[1] = true;
	    while(q1.size()>0){
	    	int i = q1.remove(); int j = q2.remove(); int k = q3.remove();
	    	ArrayList<Integer> list = lists.get(i);
	    	int x = Math.abs(init[i]-goal[i]);
	    	if((x^k)==1){count++; abc.add(i);}
	    	for(int w = 0; w<list.size(); w++){
	    		if(!visited[list.get(w)]){
	    			visited[list.get(w)] = true;
	    			q1.add(list.get(w)); q2.add(x); q3.add(j);
	    		}
	    	}
	    	
	    }
	    //dfs(1, 0, 0);
	    out.printLine(count);
	    for(int i=0; i<abc.size(); i++)out.printLine(abc.get(i));
	    out.flush();
        out.close();
	}
	
	public static void dfs(int start, int d1, int d2){
	    visited[start] = true;
    int x = Math.abs(init[start]-goal[start]);
	    ArrayList<Integer> list = lists.get(start);
	    for(int i=0; i<list.size(); i++){
	        if(!visited[list.get(i)]){
        	    if((x+d2)%2==1){
	                count++; abc.add(start);
	                dfs(list.get(i), 1, d1);
	            }else dfs(list.get(i), 0, d1);
	        }
	    }
	}
   public static int gcd(int aaa, int bbb){
        //b is greater
        if(aaa>bbb){int temp = aaa; aaa = bbb; bbb = temp;}
        if(bbb%aaa==0)return aaa;
        return gcd(bbb%aaa, aaa);
    }
	public static void add(int index, int value, int[] b){
	    while(index < b.length){
	        b[index] += value;
	        index = index + (index & (-index));
	    }
	}
	
	public static int getSum(int index, int [] b){
	    int sum = 0;
	    while(index > 0){
	        sum += b[index];
	        index = index - (index&(-index));
	    }
	    return sum;
	}
	
	public static void printArray(int[] a){
	    for(int i=1; i<a.length; i++)out.print(a[i]+" ");
	    out.printLine("---------");
	}
	
	static class Pair implements Comparable<Pair>{
	    int s;
	    //int d;
	    int len;
	    public Pair(int a, int c){
	        s = a; len = c;
	    }
	    public int compareTo(Pair p){
	        if(this.len > p.len)return 1;
	        else if(this.len < p.len)return -1;
	        return 0;
	    }
	}
}