#include <bits/stdc++.h>
using namespace std;
const int MaxN = 2 * 1e5;
int all, last[MaxN + 5], pre[MaxN + 5], other[MaxN + 5], ans[MaxN + 5];
int m, n, f1[MaxN + 5], f2[MaxN + 5], dep[MaxN + 5], tot;
void Build(int x, int y) {
  pre[++all] = last[x];
  last[x] = all;
  other[all] = y;
}
void Dfs(int x, int y) {
  int ed, dr;
  ed = last[x];
  dep[x] = dep[y] + 1;
  while (ed != -1) {
    dr = other[ed];
    if (dr != y) Dfs(dr, x);
    ed = pre[ed];
  }
}
void Dfs1(int x, int y, int odd, int even) {
  if (dep[x] % 2 == 0) {
    if (even == 1) f1[x] = 1 - f1[x];
    if (f1[x] != f2[x]) ans[++tot] = x, even = 1 - even;
  } else {
    if (odd == 1) f1[x] = 1 - f1[x];
    if (f1[x] != f2[x]) ans[++tot] = x, odd = 1 - odd;
  }
  int ed, dr;
  ed = last[x];
  while (ed != -1) {
    dr = other[ed];
    if (dr != y) Dfs1(dr, x, odd, even);
    ed = pre[ed];
  }
}
void pdo() {
  Dfs(1, 0);
  Dfs1(1, 0, 0, 0);
  printf("%d\n", tot);
  for (int i = 1; i <= tot; i++) printf("%d\n", ans[i]);
}
int main() {
  all = -1;
  memset(last, -1, sizeof(last));
  tot = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    Build(u, v), Build(v, u);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &f1[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &f2[i]);
  pdo();
}
