#include <bits/stdc++.h>
using namespace std;
const int LIM = 1e5 + 1;
vector<int> adj[LIM], toPick;
int n, u, v, init[LIM], goal[LIM], ans = 0;
void dfs(int s, int prev, int level, bool odd, bool even) {
  if (level % 2 == 0) {
    if ((even == 0 && init[s] == !goal[s]) ||
        (even == 1 && init[s] == goal[s])) {
      ans++;
      toPick.push_back(s);
      for (auto u : adj[s]) {
        if (u == prev) continue;
        dfs(u, s, level + 1, odd, !even);
      }
    } else {
      for (auto u : adj[s]) {
        if (u == prev) continue;
        dfs(u, s, level + 1, odd, even);
      }
    }
  } else if (level % 2 == 1) {
    if ((odd == 0 && init[s] == !goal[s]) || (odd == 1 && init[s] == goal[s])) {
      ans++;
      toPick.push_back(s);
      for (auto u : adj[s]) {
        if (u == prev) continue;
        dfs(u, s, level + 1, !odd, even);
      }
    } else {
      for (auto u : adj[s]) {
        if (u == prev) continue;
        dfs(u, s, level + 1, odd, even);
      }
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n - 1; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) cin >> init[i];
  for (int i = 1; i <= n; i++) cin >> goal[i];
  dfs(1, 0, 0, 0, 0);
  cout << ans << endl;
  for (int i : toPick) cout << i << endl;
}
