#include <bits/stdc++.h>
using namespace std;
int n, op;
vector<int> g[100005];
vector<int> res;
int have[100005], need[100005];
bool ap[100005];
void dfs(int node, int cost1, int cost2) {
  int curr = cost1 + have[node];
  curr = curr % 2;
  if (curr != need[node]) ++cost1, res.push_back(node);
  ap[node] = true;
  for (auto i : g[node])
    if (!ap[i]) dfs(i, cost2, cost1);
}
int main() {
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 1; i <= n; ++i) cin >> have[i];
  for (int i = 1; i <= n; ++i) cin >> need[i];
  dfs(1, 0, 0);
  cout << res.size() << '\n';
  for (auto i : res) cout << i << '\n';
}
