#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
const int MAXN = 1e5 + 2;
int V;
vi adj[MAXN];
int ans;
bool status[MAXN];
bool init[MAXN];
bool dest[MAXN];
bool shouldFlip[2];
vi fullans;
void dfs(int u, int p, bool c) {
  int curr = status[u] ^ shouldFlip[c];
  if (curr) {
    ans++;
    fullans.push_back(u);
  }
  for (int v : adj[u]) {
    if (v != p) {
      shouldFlip[c] ^= curr;
      dfs(v, u, !c);
      shouldFlip[c] ^= curr;
    }
  }
}
int main() {
  cin >> V;
  for (int i = 1; i < V; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 1; i <= V; i++) {
    cin >> init[i];
  }
  for (int i = 1; i <= V; i++) {
    cin >> dest[i];
  }
  for (int i = 1; i <= V; i++) {
    status[i] = init[i] ^ dest[i];
  }
  dfs(1, 0, 1);
  cout << ans << '\n';
  for (int u : fullans) {
    cout << u << '\n';
  }
}
