#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T u, T v) {
  while (v != 0) {
    T r = u % v;
    u = v;
    v = r;
  }
  return u;
}
template <typename T>
T factorial(T n) {
  return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n;
}
bool f[100005], c[100005], v[100005];
int n, l, r;
vector<int> ans, a[100005];
void dfs(int x, int so, int se, int h) {
  v[x] = 1;
  if ((se > 0 && se % 2 != 0 && h % 2 == 0) ||
      (so > 0 && so % 2 != 0 && h % 2 != 0))
    c[x] ^= 1;
  if (c[x] == f[x]) {
    for (int i = 0; i < a[x].size(); ++i) {
      if (!v[a[x][i]]) dfs(a[x][i], so, se, h + 1);
    }
  } else {
    ans.push_back(x);
    if (h % 2 == 0) {
      for (int i = 0; i < a[x].size(); ++i) {
        if (!v[a[x][i]]) dfs(a[x][i], so, se + 1, h + 1);
      }
    } else {
      for (int i = 0; i < a[x].size(); ++i) {
        if (!v[a[x][i]]) dfs(a[x][i], so + 1, se, h + 1);
      }
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    scanf("%d %d", &l, &r);
    a[l].push_back(r);
    a[r].push_back(l);
  }
  for (int i = 1; i <= n; ++i) cin >> c[i];
  for (int i = 1; i <= n; ++i) cin >> f[i];
  dfs(1, 0, 0, 0);
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); ++i) printf("%d\n", ans[i]);
  return 0;
}
