#include <bits/stdc++.h>
using namespace std;
const int MAX = 100010;
vector<int> G[MAX], ans;
int N, s[MAX], t[MAX];
void dfs(int v, int u, int f, int g) {
  if ((s[v] ^ f) != t[v]) ans.push_back(v + 1), f ^= 1;
  for (int &w : G[v])
    if (w != u) dfs(w, v, g, f);
}
void solve() {
  dfs(0, -1, 0, 0);
  cout << ans.size() << endl;
  for (int &v : ans) cout << v << endl;
}
void input() {
  cin >> N;
  for (int i = (int)(0); i < (int)(N - 1); i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = (int)(0); i < (int)(N); i++) cin >> s[i];
  for (int i = (int)(0); i < (int)(N); i++) cin >> t[i];
}
int main() {
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(12);
  input();
  solve();
  return 0;
}
