#include <bits/stdc++.h>
using namespace std;
vector<int> edges[100005];
bool state[100005];
bool visited[100005];
bool current[100005];
int depth[100005];
vector<int> switches;
long long counter = 0;
void dfs(int node, bool odd, bool even, int depth) {
  if (depth % 2 == 0 && even) current[node] = current[node] ^ 1;
  if (depth % 2 == 1 && odd) current[node] = current[node] ^ 1;
  visited[node] = true;
  if (state[node] != current[node]) {
    switches.push_back(node);
    if (depth % 2 == 0)
      even ^= 1;
    else
      odd ^= 1;
    counter++;
  }
  for (int i = 0; i < edges[node].size(); i++) {
    if (edges[node][i] == node || visited[edges[node][i]]) continue;
    dfs(edges[node][i], odd, even, depth + 1);
  }
  if (state[node] != current[node]) {
    if (depth % 2 == 0)
      even ^= 1;
    else
      odd ^= 1;
  }
}
int main() {
  int n;
  cin >> n;
  counter = 0;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    edges[a].push_back(b);
    edges[b].push_back(a);
  }
  for (int i = 0; i < n; i++) cin >> current[i + 1];
  for (int i = 0; i < n; i++) cin >> state[i + 1];
  dfs(1, 0, 0, 0);
  cout << counter << endl;
  for (int i = 0; i < switches.size(); i++) cout << switches[i] << endl;
  return 0;
}
