#include <bits/stdc++.h>
int oo[1 + (100000 - 1) * 2], oj[1 + (100000 - 1) * 2];
int link(int o, int j) {
  static int _ = 1;
  oo[_] = o, oj[_] = j;
  return _++;
}
int ae[100000], aa[100000], xx[100000], cnt;
void dfs(int p, int i, int f0, int f1) {
  int o;
  if (aa[i] ^ f0) {
    xx[cnt++] = i;
    f0 ^= 1;
  }
  for (o = ae[i]; o; o = oo[o]) {
    int j = oj[o];
    if (j != p) dfs(i, j, f1, f0);
  }
}
int main() {
  int n, h, i, j;
  scanf("%d", &n);
  for (h = 0; h < n - 1; h++) {
    scanf("%d%d", &i, &j), i--, j--;
    ae[i] = link(ae[i], j);
    ae[j] = link(ae[j], i);
  }
  for (i = 0; i < n; i++) scanf("%d", &aa[i]);
  for (i = 0; i < n; i++) {
    int goal;
    scanf("%d", &goal);
    aa[i] ^= goal;
  }
  dfs(-1, 0, 0, 0);
  printf("%d\n", cnt);
  while (cnt--) printf("%d\n", xx[cnt] + 1);
  return 0;
}
