#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> ans;
int init[101010];
int goal[101010];
int pr[101010];
int lvl[101010];
bool has[101010];
vector<int> g[101010];
void dfs(int v, int p) {
  if (lvl[v] > 1) {
    if (has[pr[pr[v]]]) has[v] = 1, init[v] ^= 1;
  }
  if (init[v] != goal[v]) {
    has[v] ^= 1;
    init[v] ^= 1;
    ans.push_back(v);
  }
  for (auto to : g[v]) {
    if (p == to) continue;
    pr[to] = v;
    lvl[to] = lvl[v] + 1;
    dfs(to, v);
  }
}
int main() {
  cin >> n;
  for (int i = 1, u, v; i < n; i++) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) cin >> init[i];
  for (int i = 1; i <= n; i++) cin >> goal[i];
  dfs(1, -1);
  cout << ans.size() << '\n';
  for (auto to : ans) cout << to << '\n';
}
