#include <bits/stdc++.h>
using namespace std;
const int V = (int)1e5 + 10;
const int E = V << 1;
int head[V], nxt[E], cur[E], ne;
void addEdge(int u, int v) { cur[ne] = v, nxt[ne] = head[u], head[u] = ne++; }
void initTree() { ne = 0, memset(head, -1, sizeof(head)); }
int src[V], des[V], n;
int result = 0;
vector<int> res;
void dfs(int u, int f2, int f1, int fa) {
  src[u] ^= f2;
  if (src[u] != des[u]) {
    f2 ^= 1;
    ++result;
    res.push_back(u);
  }
  for (int i = head[u]; i != -1; i = nxt[i]) {
    int v = cur[i];
    if (v == fa) continue;
    dfs(v, f1, f2, u);
  }
}
int main() {
  cin >> n;
  initTree();
  for (int i = 1; i < n; ++i) {
    int u, v;
    cin >> u >> v;
    addEdge(u, v);
    addEdge(v, u);
  }
  result = 0;
  for (int i = 1; i <= n; ++i) cin >> src[i];
  for (int i = 1; i <= n; ++i) cin >> des[i];
  res.clear();
  dfs(1, 0, 0, -1);
  cout << result << endl;
  sort(res.begin(), res.end());
  for (size_t i = 0; i < res.size(); ++i) cout << res[i] << endl;
  return 0;
}
