#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
vector<vector<long long> > adj;
long long goal[N], curr[N], visited[N];
vector<long long> ans;
void dfs(long long i, long long par, long long grand) {
  if (visited[i]) return;
  visited[i] = 1;
  if (grand) curr[i] = !curr[i];
  if (goal[i] != curr[i]) {
    ans.push_back(i + 1);
    grand = !grand;
  }
  for (long long k : adj[i]) {
    dfs(k, grand, par);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, a, b;
  cin >> n;
  adj.resize(n);
  for (long long i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--;
    b--;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (long long i = 0; i < n; i++) cin >> curr[i];
  for (long long i = 0; i < n; i++) cin >> goal[i];
  dfs(0, 0, 0);
  cout << ans.size() << endl;
  for (long long k : ans) cout << k << endl;
}
