#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a[100010], kq;
int d[100010], b[100010], res;
bool avail[100010];
int f[2];
int flip(int x) { return (x ^ 1); }
void dfs(int x, int cur) {
  avail[x] = false;
  if (f[cur % 2] == 1) {
    d[x] = flip(d[x]);
  }
  bool ok = false;
  if (d[x] != b[x]) {
    ok = true;
    kq.push_back(x);
    d[x] = flip(d[x]);
    f[cur % 2] = flip(f[cur % 2]);
  }
  for (int i = 0; i < (a[x].size()); i++) {
    int v = a[x][i];
    if (avail[v]) {
      dfs(v, cur + 1);
    }
  }
  if (ok) f[cur % 2] = flip(f[cur % 2]);
}
int main() {
  std::ios::sync_with_stdio(false);
  memset(avail, true, sizeof(avail));
  cin >> n;
  for (int i = (1); i <= (n - 1); i++) {
    int u, v;
    cin >> u >> v;
    a[u].push_back(v);
    a[v].push_back(u);
  }
  for (int i = (1); i <= (n); i++) cin >> d[i];
  for (int i = (1); i <= (n); i++) cin >> b[i];
  dfs(1, 1);
  cout << kq.size() << endl;
  for (int i = 0; i < (kq.size()); i++) cout << kq[i] << endl;
}
