#include <bits/stdc++.h>
using namespace std;
int n;
int visited[100005] = {0};
vector<int> vec[100005];
int ans[100005], change[100005];
vector<int> a;
void dfs(int v, int c, int d) {
  visited[v] = 1;
  if (ans[v] ^ c == change[v]) {
    for (int i = 0; i < vec[v].size(); i++) {
      int u = vec[v][i];
      if (visited[u] == 0) {
        dfs(u, d, c);
      }
    }
  } else {
    a.push_back(v);
    for (int i = 0; i < vec[v].size(); i++) {
      int u = vec[v][i];
      if (visited[u] == 0) {
        dfs(u, d, !c);
      }
    }
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    vec[x].push_back(y);
    vec[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) cin >> ans[i];
  for (int i = 1; i <= n; i++) cin >> change[i];
  dfs(1, 0, 0);
  cout << a.size() << endl;
  for (int i = 0; i < a.size(); i++) cout << a[i] << endl;
}
