#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n;
vector<int> edges[maxn];
vector<int> ans;
int used[maxn];
int init[maxn];
int goal[maxn];
void dfs(int u, bool odd, bool even) {
  used[u] = true;
  if (odd) init[u] = 1 - init[u];
  if (init[u] != goal[u]) {
    odd = !odd;
    init[u] = goal[u];
    ans.push_back(u);
  }
  for (int v : edges[u]) {
    if (!used[v]) dfs(v, even, odd);
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--;
    v--;
    edges[u].push_back(v);
    edges[v].push_back(u);
  }
  for (int i = 0; i < n; i++) scanf("%d", &init[i]);
  for (int i = 0; i < n; i++) scanf("%d", &goal[i]);
  dfs(0, false, false);
  cout << ans.size() << endl;
  for (int a : ans) {
    cout << a + 1 << endl;
  }
  return 0;
}
