#include <bits/stdc++.h>
using namespace std;
vector<bool> visited(100002, false);
vector<vector<long long> > adj(100002, vector<long long>());
vector<long long> reversed;
vector<long long> in(100002, 0);
vector<long long> out(100002, 0);
void dfs(long long vertex, long long no_of_times_preversed,
         long long no_of_times) {
  if (!visited[vertex]) {
    visited[vertex] = true;
    bool reverse = false;
    if (in[vertex] == out[vertex]) {
      if (no_of_times % 2) {
        reverse = true;
      }
    } else {
      if (no_of_times % 2 == 0) reverse = true;
    }
    if (reverse) {
      reversed.push_back(vertex);
      no_of_times++;
    }
    for (auto i : adj[vertex]) {
      dfs(i, no_of_times, no_of_times_preversed);
    }
  }
}
int main() {
  long long n;
  cin >> n;
  long long a, b;
  for (long long i = 1; i < n; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (long long i = 1; i <= n; i++) cin >> in[i];
  for (long long i = 1; i <= n; i++) cin >> out[i];
  dfs(1, 0, 0);
  long long x = reversed.size();
  cout << x << "\n";
  for (long long i = 0; i < x; i++) cout << reversed[i] << "\n";
}
