#include <bits/stdc++.h>
using namespace std;
bool explored[100005];
bool flipped[100005];
bool init[100005];
bool req[100005];
vector<int> res;
vector<vector<int> > T;
vector<int> parent;
void compute_parent(int root) {
  for (int i = 0; i < T[root].size(); i++) {
    int u = T[root][i];
    if (!explored[u]) {
      explored[u] = true;
      parent[u] = root;
      compute_parent(u);
    }
  }
}
void flip(bool& a) { a = !a; }
void solve(int root) {
  int p = parent[parent[root]];
  if (parent[root] != 0) flipped[root] = flipped[p];
  if (flipped[root] && parent[root] != 0) {
    flip(init[root]);
  }
  if (req[root] != init[root]) {
    flip(flipped[root]);
    flip(init[root]);
    res.push_back(root);
  }
  for (int i = 0; i < T[root].size(); i++) {
    int u = T[root][i];
    if (!explored[u]) {
      explored[u] = true;
      solve(u);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  memset(flipped, 0, sizeof flipped);
  memset(explored, 0, sizeof explored);
  int n;
  cin >> n;
  T.resize(n);
  parent.resize(n);
  int u, v;
  for (int i = 0; i < n - 1; i++) {
    cin >> u >> v;
    T[u - 1].push_back(v - 1);
    T[v - 1].push_back(u - 1);
  }
  parent[0] = 0;
  explored[0] = true;
  compute_parent(0);
  memset(explored, 0, sizeof explored);
  for (int i = 0; i < n; i++) cin >> init[i];
  for (int i = 0; i < n; i++) cin >> req[i];
  explored[0] = true;
  solve(0);
  cout << res.size() << '\n';
  for (auto& x : res) cout << x + 1 << '\n';
  return 0;
}
