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.io.*;
import java.lang.*;
import java.security.KeyStore.Entry;
public class Q2 {

	static ArrayList<Integer> adj[];
	static int color[],red[],black[],previs[];
	static boolean b[],visited[],possible;
	static Map<Long,Long> dict;
	static int totalnodes,colored,time,v[],l[],r[];
	//static int p[];
	static  HashMap<Integer,int[]> hm;//static 
	//static boolean[] isPrime=new boolean[N];
	//static int[] Primefact=new int[N];
	 static int[] init,goal;
	 static ArrayList<Integer> res;
	 
	void solve(){
		in=new InputReader(System.in);
		w=new PrintWriter(System.out);
	int n=in.nextInt();
	adj=new ArrayList[n+1];
	for(int i=1;i<=n;i++)
		adj[i]=new ArrayList<>();
	//debug(adj);
	for(int i=1;i<n;i++)
	{
		int u=in.nextInt();
		int v=in.nextInt();
		adj[u].add(v);
		adj[v].add(u);
		
	}
		init=new int[n+1];
		goal=new int[n+1];
		for(int i=1;i<=n;i++)
			init[i]=in.nextInt();
		for(int i=1;i<=n;i++)
			goal[i]=in.nextInt();
		res=new ArrayList<>();
		dfs(1,0,0,0,1);
		w.println(res.size());
		for(int i=0;i<res.size();i++)
		{
			w.println(res.get(i));
		}
		
		w.close();
					
	}
	
	public static void main(String[] args) throws IOException{
		new Q2().solve();
	}
	 void seive(int N){
		//isPrime = new boolean[(int) (n+1)];
		
		
		}
	int modularExponentiation(int x,int n,int M)
	{
	    if(n==0)
	        return 1;
	    else if(n%2 == 0)        //n is even
	        return modularExponentiation((x*x)%M,n/2,M);
	    else                             //n is odd
	        return (x*modularExponentiation((x*x)%M,(n-1)/2,M))%M;

	}
	void dfs(int x,int even,int odd,int level,int parent)
	{
		if(level%2==0 && even%2==1 || level%2==1 && odd%2==1  )
		{
			if(init[x]==1)
				init[x]=0;
			else
				init[x]=1;
		}
		if(init[x]!=goal[x])
			res.add(x);
		for(int i:adj[x])
		{
			if(i!=parent)
			{
				if(init[x]!=goal[x])
				{
					if(level%2==0)
					{
						dfs(i,even+1,odd,level+1,x);
					}
					else
					{
						dfs(i,even,odd+1,level+1,x);
					}
				}
				else
				{
					dfs(i,even,odd,level+1,x);
				}
			}
		}
	}
/*	void dfs(int u,int low,int high)
	{
		if(u==-1 || low>high)
			return;
		if(low<=v[u] && v[u]<=high){
		hm.put(v[u],true);
		}
		dfs(l[u],low,high<v[u]-1?high:v[u]-1);
		dfs(r[u],low>v[u]+1?low:v[u]+1,high);
		
	}
	
	  int dfs_red(int i)
	{
		previs[i]=time++;
		visited[i]=true;
		if(color[i]==0)
			red[i]++;
		for(int j:adj[i])
		{
			if(!visited[j])
				red[i]+=dfs_red(j);
		}
		return red[i];
	}
	 int dfs_black(int i)
	{
		
		visited[i]=true;
		if(color[i]==1)
			black[i]++;
		for(int j:adj[i])
		{
			if(!visited[j])
				black[i]+=dfs_black(j);
		}
		return black[i];
	}*/
	
	
	 public static class dsu
		{
			 
			int n;
			int parent[];
		    int s[];
			dsu(int n)
			{
				this.n=n;
				parent=new int[n+1];
				s=new int[n+1];
		        for(int i=0;i<=n;i++)
		        {
		            parent[i]=i;
		            s[i]=1;
		        }
			}
		 int find(int i)
		{
		    if (parent[i] == i)
		        return i;
		    else
		    {
		    	int result = find(parent[i]);
		        parent[i] = result;
		        return result;
		     }
		}
		}
	static InputReader in;
	static PrintWriter w;
	public boolean oj = System.getProperty("ONLINE_JUDGE") != null;

	public void tr(Object... o) {
		if (!oj)
			System.out.println(Arrays.deepToString(o));
	}

	
	public static long power(long a,long b,long c)
	{
		long ans = 1;
		while(b!=0)
		{
			if(b%2==1)
			{
				ans = ans*a;
				ans = ans % c;
			}
			a = a*a;
			a = a%c;
			b = b/2;
		}
		return ans;
	}
	static class Pair implements Comparable<Pair> {
		int i,x,w;
		
		public Pair(){
			
		}
		public Pair(int u,int v) {
			this.i=u;
			this.x=v;
			this.w=Math.min(u, v);
			
		}
		public int compareTo(Pair other) {
			
			return 0;
		}
		
		/*public String toString() {
			return "[u=" + u + ", v=" + v + "]";
		}*/
	}
	static class Node2{
		Node2 left = null;
		Node2 right = null;
		Node2 parent = null;
		int data;
	}
	
	//binaryStree
	static class BinarySearchTree{
		Node2 root = null;
		int height = 0;
		int max = 0;
		int cnt = 1;
		ArrayList<Integer> parent = new ArrayList<>();
		HashMap<Integer, Integer> hm = new HashMap<>();
		public void insert(int x){
			Node2 n = new Node2();
			n.data = x;
			if(root==null){
				root = n;
			}
			else{
				Node2 temp = root,temp2 = null;
				while(temp!=null){
					temp2 = temp;
					if(x>temp.data) temp = temp.right;
					else temp = temp.left;
				}
				if(x>temp2.data) temp2.right = n;
				else temp2.left = n;
				n.parent = temp2;
				parent.add(temp2.data);
			}
		}
		public Node2 getSomething(int x, int y, Node2 n){
			if(n.data==x || n.data==y) return n;
			else if(n.data>x && n.data<y) return n;
			else if(n.data<x && n.data<y) return getSomething(x,y,n.right);
			else return getSomething(x,y,n.left);
		}
		public Node2 search(int x,Node2 n){
			if(x==n.data){
				max = Math.max(max, n.data);
				return n;
			}
			if(x>n.data){
				max = Math.max(max, n.data);
				return search(x,n.right);
			}
			else{
				max = Math.max(max, n.data);
				return search(x,n.left);
			}
		}
		public int getHeight(Node2 n){
			if(n==null) return 0;
			height = 1+ Math.max(getHeight(n.left), getHeight(n.right));
			return height;
		}
	}
public static void debug(Object... o) {
	System.out.println(Arrays.deepToString(o));
}

public static String rev(String s)
{
	StringBuilder sb=new StringBuilder(s);
	sb.reverse();
	return sb.toString();
}

static long lcm(long a, long b)
{
    return a * (b / gcd(a, b));
}

static long gcd(long a, long b)
{
    while (b > 0)
    {
        long temp = b;
        b = a % b; // % is remainder
        a = temp;
    }
    return a;
}

public static long max(long x, long y, long z){
		if(x>=y && x>=z) return x;
		if(y>=x && y>=z) return y;
		return z;
	}
	static int[] sieve(int n,int[] arr)
	{
	for(int i=2;i*i<=n;i++)
	{
		if(arr[i]==0)
		{
			for(int j=i*2;j<=n;j+=i)
				arr[j]=1;
		}
	}
	return arr;
	}




static class InputReader {

private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;

public InputReader(InputStream stream) {
  this.stream = stream;
}

public int snext() {
  if (snumChars == -1)
    throw new InputMismatchException();
  if (curChar >= snumChars) {
    curChar = 0;
    try {
      snumChars = stream.read(buf);
    } catch (IOException e) {
      throw new InputMismatchException();
    }
    if (snumChars <= 0)
      return -1;
  }
  return buf[curChar++];
}

public int nextInt() {
  int c = snext();
  while (isSpaceChar(c)) {
    c = snext();
  }
  int sgn = 1;
  if (c == '-') {
    sgn = -1;
    c = snext();
  }
  int res = 0;
  do {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = snext();
  } while (!isSpaceChar(c));
  return res * sgn;
}

public long nextLong() {
  int c = snext();
  while (isSpaceChar(c)) {
    c = snext();
  }
  int sgn = 1;
  if (c == '-') {
    sgn = -1;
    c = snext();
  }
  long res = 0;
  do {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = snext();
  } while (!isSpaceChar(c));
  return res * sgn;
}

public int[] nextIntArray(int n) {
	 return nextIntArray(n, 0);
	    }
	    
public int[] nextIntArray(int n, int off) {
	 int[] arr = new int[n + off];
	   for (int i = 0; i < n; i++) {
	    arr[i + off] = nextInt();
	    }
	    return arr;
	    }
	    
public long[] nextLongArray(int n) {
return nextLongArray(n, 0);
	    }
        
	public long[] nextLongArray(int n, int off) {
	 long[] arr = new long[n + off];
	 for (int i = 0; i < n; i++) {
		  arr[i + off] = nextLong();
		 }
 return arr;
	}


public String readString() {
  int c = snext();
  while (isSpaceChar(c)) {
    c = snext();
  }
  StringBuilder res = new StringBuilder();
  do {
    res.appendCodePoint(c);
    c = snext();
  } while (!isSpaceChar(c));
  return res.toString();
}

public String nextLine() {
  int c = snext();
  while (isSpaceChar(c))
    c = snext();
  StringBuilder res = new StringBuilder();
  do {
    res.appendCodePoint(c);
    c = snext();
  } while (!isEndOfLine(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;
}

private boolean isEndOfLine(int c) {
  return c == '\n' || c == '\r' || c == -1;
}

public interface SpaceCharFilter {
  public boolean isSpaceChar(int ch);
}
}
	
}