#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> visited, init, goal, flip;
vector<vector<int> > adjlist;
vector<int> ans;
void dfs(int s) {
  visited[s] = 1;
  if (flip[s]) {
    for (int i = 0; i < (int)adjlist[s].size(); i++) {
      if (visited[adjlist[s][i]]) continue;
      for (int j = 0; j < (int)adjlist[adjlist[s][i]].size(); j++) {
        if (visited[adjlist[adjlist[s][i]][j]] == 0)
          flip[adjlist[adjlist[s][i]][j]] += flip[s];
      }
    }
  }
  int colour = init[s];
  if (flip[s] % 2 == 1) {
    if (colour == 0)
      colour = 1;
    else
      colour = 0;
  }
  flip[s] = 0;
  if (colour != goal[s]) {
    ans.push_back(s + 1);
    for (int i = 0; i < (int)adjlist[s].size(); i++) {
      if (visited[adjlist[s][i]]) continue;
      for (int j = 0; j < (int)adjlist[adjlist[s][i]].size(); j++) {
        if (visited[adjlist[adjlist[s][i]][j]] == 0)
          flip[adjlist[adjlist[s][i]][j]]++;
      }
    }
  }
  for (int i = 0; i < (int)adjlist[s].size(); i++) {
    int u = adjlist[s][i];
    if (visited[u] == 0) dfs(u);
  }
}
int main() {
  while (scanf("%d", &n) == 1) {
    ans.clear();
    flip.assign(n, 0);
    visited.assign(n, 0);
    init.assign(n, 0);
    goal.assign(n, 0);
    adjlist.assign(n, vector<int>());
    for (int i = 0; i < n - 1; i++) {
      int u, v;
      scanf("%d %d", &u, &v);
      --u, --v;
      adjlist[u].push_back(v);
      adjlist[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);
    printf("%d\n", (int)ans.size());
    for (int i = 0; i < (int)ans.size(); i++) {
      printf("%d\n", ans[i]);
    }
  }
  return 0;
}
