#include <bits/stdc++.h>
using namespace std;
vector<int> g[100010], ans;
int goal[100010], init[100010];
bool visited[100010];
int n, m;
void dfs(int v, int cur, int pre) {
  visited[v] = true;
  if ((init[v] ^ cur) != goal[v]) {
    ans.push_back(v);
    cur ^= 1;
  }
  for (auto x : g[v]) {
    if (!visited[x]) dfs(x, pre, cur);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  int a, b;
  for (int i = 0; i < n - 1; ++i) {
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 1; i <= n; ++i) cin >> init[i];
  for (int i = 1; i <= n; ++i) cin >> goal[i];
  dfs(1, 0, 0);
  cout << ans.size() << endl;
  for (auto x : ans) cout << x << endl;
  return 0;
}
