#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int cnt, p1[maxn], p2[maxn];
int res[maxn];
int tt;
struct node {
  int u, v;
  node *next;
} * head[maxn], edge[maxn << 1];
void adde(int u, int v) {
  edge[cnt].v = v;
  edge[cnt].next = head[u];
  head[u] = &edge[cnt++];
}
void dfs(int x, int fa, int pt1, int pt2) {
  int pt;
  p1[x] ^= pt1;
  if (p1[x] == p2[x])
    pt = 0;
  else
    pt = 1, res[tt++] = x;
  for (node *p = head[x]; p != NULL; p = p->next)
    if (p->v != fa) dfs(p->v, x, pt2, pt ^ pt1);
}
int main() {
  int n, i;
  while (cin >> n) {
    int u, v;
    cnt = 0;
    memset(head, 0, sizeof head);
    for (i = 1; i < n; i++) {
      cin >> u >> v;
      adde(u, v);
      adde(v, u);
    }
    for (i = 1; i <= n; i++) cin >> p1[i];
    for (i = 1; i <= n; i++) cin >> p2[i];
    dfs(1, -1, 0, 0);
    cout << tt << endl;
    for (i = 0; i < tt; i++) cout << res[tt - i - 1] << endl;
  }
  return 0;
}
