#include <bits/stdc++.h>
using namespace std;
vector<int> V[100005], ans;
bool vis[100005] = {0};
int cur[100005], goal[100005], cn[100005];
void dfs(int i, bool par, bool ch) {
  vis[i] = true;
  if ((cur[i] != goal[i] && !par) || (cur[i] == goal[i] && par)) {
    par = !par;
    ans.push_back(i);
  }
  for (int j = 0; j < V[i].size(); j++) {
    if (vis[V[i][j]]) continue;
    dfs(V[i][j], ch, par);
  }
}
int main() {
  int n, u, v;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> u >> v;
    V[u].push_back(v);
    V[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) {
    cin >> cur[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> goal[i];
  }
  dfs(1, 0, 0);
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << "\n";
  }
}
