#include <bits/stdc++.h>   using namespace std;   int v[100005], goal[100005], parent[100005];   bool used[100005];   int n;   vector<int> A[100005], leaves, sol;   void dfs(int node, int current_xor, int other_xor) {     if (used[node]) return;     used[node] = 1;     if ((v[node] ^ current_xor) != goal[node]) {       sol.push_back(node);       current_xor ^= 1;     }     for (int i = 0; i < A[node].size(); i++) {       dfs(A[node][i], other_xor, current_xor);     }   }   int main() {     scanf( %d , &n);     for (int i = 1, x, y; i < n; i++) {       scanf( %d %d , &x, &y);       A[x].push_back(y);       A[y].push_back(x);     }     for (int i = 1; i <= n; i++) scanf( %d , &v[i]);     for (int i = 1; i <= n; i++) scanf( %d , &goal[i]);     dfs(1, 0, 0);     printf( %d n , sol.size());     for (int i = 0; i < sol.size(); i++) {       printf( %d n , sol[i]);     }     return 0;   }   