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:

/**
 * Date: 14 Nov, 2018
 * Link:
 *
 * @author Prasad-Chaudhari
 * @linkedIn: https://www.linkedin.com/in/prasad-chaudhari-841655a6/
 * @git: https://github.com/Prasad-Chaudhari
 */
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.Stack;

public class newProgram1 {

    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        FastIO in = new FastIO();
        int n = in.ni();
        int adja[][] = in.gg(n, n - 1);
        int curr[] = in.gia(n);
        int good[] = in.gia(n);
        Stack<Integer> st = new Stack<>();
        boolean b[] = new boolean[n + 1];
        b[1] = true;
        st.push(1);
        int parent[] = new int[n + 1];
        Arrays.fill(parent, -1);
        while (!st.isEmpty()) {
            int root = st.pop();
            for (int i : adja[root]) {
                if (!b[i]) {
                    b[i] = true;
                    st.push(i);
                    parent[i] = root;
                }
            }
        }
        int new_parent[] = new int[n + 1];
        Arrays.fill(new_parent, -1);
        for (int i = 2; i <= n; i++) {
            new_parent[i] = parent[parent[i]];
        }
        int from[] = new int[n - 1];
        int to[] = new int[n - 1];
        int index = 0;
        int countt[] = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            if (new_parent[i] != -1) {
                from[index] = i;
                to[index] = new_parent[i];
                countt[from[index]]++;
                countt[to[index]]++;
                index++;
            }
        }
        for (int i = 1; i <= n; i++) {
            adja[i] = new int[countt[i]];
        }
        for (int i = 0; i < index; i++) {
            adja[from[i]][--countt[from[i]]] = to[i];
            adja[to[i]][--countt[to[i]]] = from[i];
        }
//        for (int i = 1; i <= n; i++) {
//            System.out.println(i + " " + new_parent[i]);
//        }
//        System.out.println("");
        Arrays.fill(b, false);
        boolean operate[] = new boolean[n + 1];
        int count = 0;
        int numb[] = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            if (new_parent[i] == -1) {
                st.push(i);
                b[i] = true;
                while (!st.isEmpty()) {
                    int root = st.peek();
                    boolean p = true;
                    for (int j : adja[root]) {
                        p &= b[j];
                    }
                    if (p) {
                        if (curr[root - 1] != good[root - 1]) {
                            numb[root] = 1;
                            operate[root] = true;
                        }
                        st.pop();
                    } else {
                        for (int j : adja[root]) {
                            if (!b[j]) {
                                b[j] = true;
                                st.push(j);
                            }
                        }
                    }
                }
            }
        }
//        for (int i = 1; i <= n; i++) {
//            System.out.println(i + " " + numb[i]);
//        }
        Arrays.fill(b, false);
        for (int i = 1; i <= n; i++) {
            if (new_parent[i] == -1) {
                st.push(i);
                b[i] = true;
                while (!st.isEmpty()) {
                    int root = st.peek();
                    boolean p = true;
                    for (int j : adja[root]) {
                        p &= b[j];
                    }
                    if (p) {
                        st.pop();
                    } else {
                        for (int j : adja[root]) {
                            if (!b[j]) {
                                b[j] = true;
                                st.push(j);
                                operate[j] = numb[root] != numb[j];
                            }
                        }
                    }
                }
            }
        }
//        for (int i = 1; i <= n; i++) {
//            if (i % 2 == 1) {
//                System.out.println(i + " " + numb[i]);
//            }
//        }
//        for (int i : numb) {
//            count += i % 2;
//        }
//        System.out.println(count);
//        for (int i = 1; i <= n; i++) {
//            if (numb[i] % 2 == 1) {
//                System.out.println(i);
//            }
//        }
        for (boolean p : operate) {
            count += p ? 1 : 0;
        }
        System.out.println(count);
        for (int i = 1; i <= n; i++) {
            if (operate[i]) {
                System.out.println(i);
            }
        }

    }

    static class FastIO {

        private final BufferedReader br;
        private final BufferedWriter bw;
        private String s[];
        private int index;
        private StringBuilder sb;

        public FastIO() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
            bw = new BufferedWriter(new OutputStreamWriter(System.out, "UTF-8"));
            s = br.readLine().split(" ");
            sb = new StringBuilder();
            index = 0;
        }

        public int ni() throws IOException {
            return Integer.parseInt(nextToken());
        }

        public double nd() throws IOException {
            return Double.parseDouble(nextToken());
        }

        public long nl() throws IOException {
            return Long.parseLong(nextToken());
        }

        public String next() throws IOException {
            return nextToken();
        }

        public String nli() throws IOException {
            try {
                return br.readLine();
            } catch (IOException ex) {

            }
            return null;
        }

        public int[] gia(int n) throws IOException {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public int[] gia(int n, int start, int end) throws IOException {
            validate(n, start, end);
            int a[] = new int[n];
            for (int i = start; i < end; i++) {
                a[i] = ni();
            }
            return a;
        }

        public double[] gda(int n) throws IOException {
            double a[] = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }

        public double[] gda(int n, int start, int end) throws IOException {
            validate(n, start, end);
            double a[] = new double[n];
            for (int i = start; i < end; i++) {
                a[i] = nd();
            }
            return a;
        }

        public long[] gla(int n) throws IOException {
            long a[] = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }

        public long[] gla(int n, int start, int end) throws IOException {
            validate(n, start, end);
            long a[] = new long[n];
            for (int i = start; i < end; i++) {
                a[i] = nl();
            }
            return a;
        }

        public int[][] gg(int n, int m) throws IOException {
            int adja[][] = new int[n + 1][];
            int from[] = new int[m];
            int to[] = new int[m];
            int count[] = new int[n + 1];
            for (int i = 0; i < m; i++) {
                from[i] = ni();
                to[i] = ni();
                count[from[i]]++;
                count[to[i]]++;
            }
            for (int i = 0; i <= n; i++) {
                adja[i] = new int[count[i]];
            }
            for (int i = 0; i < m; i++) {
                adja[from[i]][--count[from[i]]] = to[i];
                adja[to[i]][--count[to[i]]] = from[i];
            }
            return adja;
        }

        public void print(String s) throws IOException {
            bw.write(s);
        }

        public void println(String s) throws IOException {
            bw.write(s);
            bw.newLine();
        }

        private String nextToken() throws IndexOutOfBoundsException, IOException {
            if (index == s.length) {
                s = br.readLine().split(" ");
                index = 0;
            }
            return s[index++];
        }

        private void validate(int n, int start, int end) {
            if (start < 0 || end >= n) {
                throw new IllegalArgumentException();
            }
        }
    }

    static class Data implements Comparable<Data> {

        int a, b;

        public Data(int a, int b) {
            this.a = a;
            this.b = b;
        }

        @Override
        public int compareTo(Data o) {
            if (a == o.a) {
                return Integer.compare(b, o.b);
            }
            return Integer.compare(a, o.a);
        }

        public static void sort(int a[]) {
            Data d[] = new Data[a.length];
            for (int i = 0; i < a.length; i++) {
                d[i] = new Data(a[i], 0);
            }
            Arrays.sort(d);
            for (int i = 0; i < a.length; i++) {
                a[i] = d[i].a;
            }
        }
    }
}