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.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

public class Main {

    static Main.MyScanner sc = new Main.MyScanner();

    static PrintWriter out = new PrintWriter(System.out);
//    static PrintStream out = System.out;


    public static void main(String[] args) throws ParseException {

        int n = sc.nextInt() ;
        ArrayList<Integer> al[] = new ArrayList[n] ;
        for(int i = 0 ; i < n ; i++) al[i] = new ArrayList<>() ;

        for(int i = 0 ; i < n-1 ; i++) {
            int a = sc.nextInt() - 1 , b = sc.nextInt() - 1 ;
            al[a].add(b) ;
            al[b].add(a) ;
        }

        boolean flags[] = new boolean[n],visited[] = new boolean[n] ;

        for(int i = 0 ; i < n ; i++) if(sc.nextInt() == 1) flags[i] = true ;
        for(int i = 0 ; i < n ; i++) {
            int now = sc.nextInt() ;
            if(now == 1 && flags[i]) flags[i] = true ;
            else if(now == 0 && !flags[i]) flags[i] = true ;
            else flags[i] = false ;
        }

        ArrayList<Integer> ans = new ArrayList<>() ;

        Stack<Integer> st = new Stack<>();

        st.add(0);
        st.add(0);
        st.add(0);
        st.add(0);

        while (!st.isEmpty()) {
            int curLev = st.pop(),e = st.pop(),o = st.pop(),node = st.pop() ;

            if(visited[node]) continue; ;

            visited[node] = true ;

            boolean isChanged = false ;

            if(curLev%2 == 0 && ((e%2 == 0 && !flags[node])||(e%2 == 1 && flags[node]))) {
                isChanged = true ;
                e++;
                ans.add(node+1) ;
            }

            if(curLev%2 == 1 && ((o%2 == 0 && !flags[node])||(o%2 == 1 && flags[node]))) {
                isChanged = true ;
                o++;
                ans.add(node+1) ;
            }

            for(Integer child : al[node]) {
                st.push(child);
                st.push(o);
                st.push(e);
                st.push(curLev+1);

            }

            if(isChanged)
                if(curLev%2 == 0) e--;
                else o--;

        }

        out.println(ans.size() + " ");

        for(int x : ans)
            out.println(x + " ");
        out.close();
    }

    private static ArrayList<Integer> dfs(ArrayList<Integer>[] al, boolean[] flags, int curLev, int e, int o, int node, boolean[] visited) {

        if(visited[node]) return new ArrayList<>() ;

        visited[node] = true ;

        boolean isChanged = false ;

        ArrayList<Integer> tot = new ArrayList<>() ;

        if(curLev%2 == 0 && ((e%2 == 0 && !flags[node])||(e%2 == 1 && flags[node]))) {
            isChanged = true ;
            e++;
            tot.add(node+1) ;
        }

        if(curLev%2 == 1 && ((o%2 == 0 && !flags[node])||(o%2 == 1 && flags[node]))) {
            isChanged = true ;
            o++;
            tot.add(node+1) ;
        }

        for(Integer child : al[node]) {
            tot.addAll(dfs(al,flags,curLev+1,e,o,child,visited)) ;
        }

        if(isChanged)
            if(curLev%2 == 0) e--;
            else o--;

        return tot ;
    }

    static private class MyScanner {

        static public class Fen {
            public static long read(long[] tree,int idx){
                int sum = 0;
                while (idx > 0){
                    sum += tree[idx];
                    idx -= (idx & -idx);
                }
                return sum;
            }

            public static void update(long[] tree,int idx ,long val){
                int MaxVal = tree.length - 1 ;
                while (idx <= MaxVal){
                    tree[idx] += val;
                    idx += (idx & -idx);
                }
            }

        }
        Fen fen = new Fen();
        Double pi = 3.141592653589793238462643383279;


        private static int[] compress(int[] arr) {
            int temp[] = new int[arr.length] ;
            for(int i = 0 ; i < arr.length ; i++) temp[i] = arr[i] ;
            Arrays.sort(temp);
            HashMap<Integer,Integer> hm = new HashMap<>() ;
            int point = 1 ;
            for(Integer x : temp) {
                if(!hm.containsKey(x)) {
                    hm.put(x,point++) ;
                }
            }
            for(int i = 0 ; i < arr.length ; i++) arr[i] = hm.get(arr[i]) ;
            return arr;
        }

        BufferedReader br;

        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public long mod(long x) {
            // TODO Auto-generated method stub
            return (x % 1000000007);
        }

        boolean hasNext() {
            if (st.hasMoreElements())
                return true;
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
            return st.hasMoreTokens();
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }

}