#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > G(100001);
vector<long long> v;
long long init[100001];
long long goal[100001];
long long vis[100001];
void dfs(long long node, long long x, long long y) {
  vis[node] = 1;
  if (init[node] ^ x != goal[node]) {
    v.push_back(node);
    x ^= 1;
  }
  for (long long i = 0; i < G[node].size(); i++) {
    if (!vis[G[node][i]]) dfs(G[node][i], y, x);
  }
}
int main() {
  long long n;
  cin >> n;
  for (long long i = 1; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    G[x].push_back(y);
    G[y].push_back(x);
  }
  for (long long i = 1; i < n + 1; i++) cin >> init[i];
  for (long long i = 1; i < n + 1; i++) cin >> goal[i];
  dfs(1, 0, 0);
  cout << v.size() << "\n";
  for (auto i : v) cout << i << "\n";
}
