#include <bits/stdc++.h>
using namespace std;
vector<int> adj[100100], v;
bool vs[100100];
int a[100100], b[100100];
int n, ans = 0;
void dfs(int s, int odd, int even) {
  if (odd) a[s] ^= 1;
  if (vs[s]) return;
  if (a[s] != b[s]) {
    v.push_back(s);
    ans++;
    odd ^= 1;
  }
  vs[s] = true;
  for (auto u : adj[s]) {
    dfs(u, even, odd);
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
  }
  dfs(1, 0, 0);
  cout << ans << endl;
  for (auto i : v) {
    cout << i << endl;
  }
}
