#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 10;
const double eps = 1e-9;
const int inf = 1e9;
int a[mx], b[mx];
vector<int> adj[mx], ans;
void dfs(int u, int p, int ev, int od, int len) {
  if (len % 2) {
    if (od) a[u] = !a[u];
  } else {
    if (ev) a[u] = !a[u];
  }
  if (a[u] != b[u]) {
    a[u] = b[u];
    ans.push_back(u);
    if (len % 2)
      od = !od;
    else
      ev = !ev;
  }
  for (auto v : adj[u]) {
    if (v != p) dfs(v, u, ev, od, len + 1);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 1; i <= n; i++) scanf("%d", b + i);
  dfs(1, 0, 0, 0, 0);
  printf("%d\n", (int)ans.size());
  for (auto x : ans) printf("%d\n", x);
}
