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.io.*;
import java.math.BigInteger;
import java.util.*;
 
 
public class Main {
	static HashSet<Integer> set;
	static int count=0;
	static int citi=0;
	static ArrayList<Integer> left=new ArrayList<Integer>();
	static ArrayList<Integer> right=new ArrayList<Integer>();
	static ArrayList<Integer> g[];
	static boolean visited[];
	static int Flips[];
	static int init[];
	static int goal[];
	static ArrayList<Integer> ans;
	public static void main(String[] args) throws IOException 
		{
		InputReader in = new InputReader(System.in);
		PrintWriter pw = new PrintWriter(System.out);
//int n=in.nextInt();
		/*
BST b=new BST();
Node root=b.NewNode(1);
root.left=b.NewNode(3);
root.right=b.NewNode(2);
root.left.left=b.NewNode(4);
root.left.right=b.NewNode(5);
root.left.left.left=b.NewNode(6);*/
		int n=in.nextInt();
		g=new ArrayList[n+1];
		for(int i=1;i<=n;i++)
			g[i]=new ArrayList<Integer>();
		for(int i=1;i<n;i++)
		{
			int x=in.nextInt();
			int y=in.nextInt();
			g[x].add(y);
			g[y].add(x);			
		}
		int level=1;
		init=in.nextIntArray(n);
		goal=in.nextIntArray(n);
		visited=new boolean[n+2];
		Flips=new int[n+2];
		ans=new ArrayList<Integer>();
		int odd=0;
		if(init[0]!=goal[0])
		{
			ans.add(1);
			Flips[level]++;
			odd++;
		}
		level=1;
		dfs1(1,level,0,odd);
		int sum=0;
		System.out.println(ans.size());
		for(int i=0;i<ans.size();i++)
			System.out.println(ans.get(i));
	   	}
      public static void dfs1(int curr,int level,int even,int odd)
      {
    	  visited[curr]=true;
    	  if(level%2==0)
    	  {
    		  if(even%2==0)
    		  {
    			  if(init[curr-1]!=goal[curr-1])
    			  {
    				  ans.add(curr);
    				  Flips[level]++;
    				  even++;
    			  }
    			  for(int x:g[curr])
    			  {
    				  if(!visited[x])
    					  dfs1(x,level+1,even,odd);
    			  }
    		  }
    		  else
    		  {
    			  if(init[curr-1]==goal[curr-1])
    			  {
    				  ans.add(curr);
    				  Flips[level]++;
    				  even++;
    			  }
    			  for(int x:g[curr])
    			  {
    				  if(!visited[x])
    					  dfs1(x,level+1,even,odd);
    			  }
    		  }
    	  }
    	  else
    	  {
    		  if(odd%2==0)
    		  {
    			  if(init[curr-1]!=goal[curr-1])
    			  {
    				  ans.add(curr);
    				  Flips[level]++;
    				  odd++;
    			  }
    			  for(int x:g[curr])
    			  {
    				  if(!visited[x])
    					  dfs1(x,level+1,even,odd);
    			  }
    		  }
    		  else
    		  {
    			  if(init[curr-1]==goal[curr-1])
    			  {
    				  ans.add(curr);
    				  Flips[level]++;
    				  odd++;
    			  }
    			  for(int x:g[curr])
    			  {
    				  if(!visited[x])
    					  dfs1(x,level+1,even,odd);
    			  }
    		  }
    	  }
    	  //level++;
      }
		
//	int q=in.nextInt();
	  //   int q=0;
/*	HashMap<Integer,HashMap<Integer,Integer>> hm=new HashMap<Integer,HashMap<Integer,Integer>>();
	while(q-->0)
	{
		int type=in.nextInt();
		if(type==1){
		int u=in.nextInt();
		int v=in.nextInt();
		int w=in.nextInt();
		int min=Math.min(v, u);
		int max=Math.max(v, u);
		u=min;
		v=max;
		System.out.println(v+" "+u);
	    while(v!=u)
		{
			System.out.println(v+" "+(v/2));
		if(!hm.containsKey(v))
		{
		HashMap<Integer,Integer> hm1=new HashMap<Integer,Integer>();
		if(!hm1.containsKey(v/2))
			hm1.put(v/2,w);
		else
			hm1.put(v/2,hm1.get(v/2)+w);
		hm.put(v,hm1);
		}
		else
		{
			HashMap<Integer,Integer> hm1=hm.get(v);
			if(!hm1.containsKey(v/2))
			{
				hm1.put(v/2,w);
			}
			else
				hm1.put(v/2, hm1.get(v/2)+w);
			hm.put(v,hm1);
		}
		v/=2;
		}
		}
		else
		{
			HashMap<Integer,Integer> hm2=hm.get(4);
			
			int u=in.nextInt();
			int v=in.nextInt();
			int min=Math.min(v, u);
			int max=Math.max(u, v);
			u=max;
			v=min;
		//System.out.println(u+" "+v);
		}
	}
		}
	public static String reverse(String s)
	{
		StringBuilder sb=new StringBuilder(s);
		return sb.reverse().toString();
	}
	/**    public static void dfs(int curr,int t)
	    {
	    	visited[curr]=true;
	    	//edjes++;
	    	col[curr]=t;
	    	if(t%2==0)
	    		left.add(curr);
	    	else
	    		right.add(curr);
	    	for(int x:g[curr])
	    	{
	    		edjes++;
	    		if(!visited[x])
	    			dfs(x,t+1);
	    		else
	    		{
	    			if(col[curr]%2==col[x]%2)
	    			{
	    				System.out.println(-1);
	    				System.exit(0);
	    			}
	    		}
	    	}
	    }
	
		/*public static boolean dfs(int curr,int prev)
		{
			vis[curr]=true;
		    int trees=0;
		    for(int x:g[curr])
		    {
		    	if(!vis[x])
		    	{
		    		trees++;
		    		Continue[curr]&=dfs(x,curr);
		    	}
		    }
		  System.out.println(curr+" "+prev+" " +Math.abs(curr-prev)+" "+Continue[5]);
		  if(trees==0)
		  {
			  Continue[curr]=true;
			  if(Math.abs(prev-curr)==1)
				  return true;
			  else
				  return false;
		  }
		  else
		  {
			  if(Continue[curr])
			  {
				  if(Math.abs(prev-curr)==1)
					  return true;
				  else
					  return false;
			  }
			  return false;
		  }
		    
		}
	/*	public static void dfs(int curr,int prev)
		{
			for(int x:g[curr])
			{
				if(x!=prev)
				{
		            dfs(x,curr);
		            val[curr]+=val[x];
					
			    }
			}
		}
	/*	public static boolean dfs2(int curr,int prev)
		{
			for(int x:g[curr])
			{
			    if(x!=prev)
			    {
			    	bool[curr]|=dfs2(x,curr);
			    }
			}
			if(bool[curr])
				return true;
			else if(two[curr].contains(prev)&&(!bool[curr]))
			{
			      ans.add(curr);
		        bool[prev]=true;
				bool[curr]=true;
				return true;
			}
			
			return false;
		}
	*/
		public static long power(long a,long b)
		{
			long result=1;
			while(b>0)
			{
				if(b%2==1)
					result*=a;
				a=a*a;
				b/=2;
			}
			return result;
		}
				public static long pow(long n,long p,long m)
	{
		 long  result = 1;
		  if(p==0)
		    return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    if(result>=m)
		    result%=m;
		    p >>=1;
		    n*=n;
		    if(n>=m)
		    n%=m;
		}
		return result;
	}
	static class Pair implements Comparable<Pair>{
		int aud;
		int vid;
		Pair(int mr,int er){
			aud=mr;
			vid=er;
			
		}
		@Override
		public int compareTo(Pair o) {
			return 1;
			}
	}
	public static long gcd(long a, long b) {
		  if (b == 0) return a;
		  return gcd(b, a%b);
		}
	static class InputReader {
 
		private InputStream stream;
		private 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) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}
 
		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 boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
 
		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}
}