#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
vector<int> fr, to;
vector<int> ans;
void dfs(int u, int p = -1, int d = 0, int d1 = 0, int d2 = 0) {
  if (d & 1) {
    int k = d1 & 1;
    if (fr[u] != to[u]) {
      if (!k) {
        d1++;
        ans.push_back(u + 1);
      }
    } else {
      if (k) {
        d1++;
        ans.push_back(u + 1);
      }
    }
  } else {
    int k = d2 & 1;
    if (fr[u] != to[u]) {
      if (!k) {
        d2++;
        ans.push_back(u + 1);
      }
    } else {
      if (k) {
        d2++;
        ans.push_back(u + 1);
      }
    }
  }
  for (auto v : g[u])
    if (v != p) dfs(v, u, d + 1, d1, d2);
}
signed main() {
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  g.resize(n);
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  fr.resize(n);
  to.resize(n);
  for (auto& el : fr) cin >> el;
  for (auto& el : to) cin >> el;
  dfs(0);
  cout << ((int)ans.size()) << endl;
  for (auto el : ans) cout << el << endl;
  return 0;
}
