#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g;
vector<int> aa;
int n, m, a, b;
bool *d, *e;
bool p1, p2;
bool *vis;
void dfs(int x, bool now) {
  vis[x] = 1;
  if (now == true) {
    if (p1 == true) d[x] = !d[x];
  } else {
    if (p2 == true) d[x] = !d[x];
  }
  if (d[x] != e[x]) {
    d[x] = !d[x];
    aa.push_back(x);
    if (now == true)
      p1 = !p1;
    else
      p2 = !p2;
  }
  bool s1, s2;
  for (int i = 0; i < g[x].size(); ++i)
    if (vis[g[x][i]] != 1) {
      s1 = p1;
      s2 = p2;
      dfs(g[x][i], !now);
      p1 = s1;
      p2 = s2;
    }
}
int main() {
  cin >> n;
  d = new bool[n + 1];
  e = new bool[n + 1];
  vis = new bool[n + 1];
  g.resize(n + 1);
  for (int i = 0; i < n - 1; ++i) {
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 0; i < n; ++i) {
    cin >> d[i + 1];
    vis[i + 1] = 0;
  }
  for (int i = 0; i < n; ++i) cin >> e[i + 1];
  dfs(1, 0);
  cout << aa.size() << "\n";
  for (int i = 0; i < aa.size(); ++i) cout << aa[i] << "\n";
  return 0;
}
