#include <bits/stdc++.h>
using namespace std;
int vis[111111], x[111111], y[111111];
vector<int> adj[111111];
vector<int> moves;
void dfs(int u, int at, int ne) {
  vis[u] = 1;
  if (x[u] ^ at != y[u]) {
    at ^= 1;
    moves.push_back(u);
  }
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (!vis[v]) dfs(v, ne, at);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) cin >> x[i];
  for (int i = 1; i <= n; i++) cin >> y[i];
  dfs(1, 0, 0);
  cout << moves.size() << endl;
  for (int i = 0; i < moves.size(); i++) cout << moves[i] << endl;
  return 0;
}
