#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
struct Edge {
  int v, next;
} edge[N * 2];
int head[N], cnt, turn[N], a[N], vis[N], ans;
void addedge(int u, int v) {
  edge[cnt].v = v;
  edge[cnt].next = head[u];
  head[u] = cnt++;
}
void init() {
  memset(head, -1, sizeof(head));
  memset(vis, 0, sizeof(vis));
  cnt = 0;
  ans = 0;
}
void dfs(int u, int x1, int x2) {
  if (vis[u]) return;
  vis[u] = 1;
  a[u] = a[u] ^ x1;
  if (a[u]) {
    turn[ans++] = u;
    x1 ^= 1;
    a[u] = 0;
  }
  for (int i = head[u]; i + 1; i = edge[i].next) {
    int v = edge[i].v;
    dfs(v, x2, x1);
  }
  return;
}
int main() {
  int n;
  cin >> n;
  int t = n;
  int u, v;
  init();
  while (--t) {
    cin >> u >> v;
    addedge(u, v);
    addedge(v, u);
  }
  for (int i = 1; i <= n; i++) cin >> a[i];
  int x;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    a[i] ^= x;
  }
  dfs(1, 0, 0);
  cout << ans << endl;
  for (int i = 0; i < ans; i++) cout << turn[i] << endl;
  return 0;
}
