#include <bits/stdc++.h>
using namespace std;
vector<long long> tree[1 << 20];
long long a[1 << 20], goal[1 << 20];
vector<long long> ans;
void dfs(long long v, long long cnt1 = 0, long long cnt2 = 0,
         long long par = -1) {
  for (long long i = 0; i < cnt1; i++) {
    a[v] = !a[v];
  }
  if (goal[v] != a[v]) {
    cnt1++;
    ans.push_back(v);
  }
  for (long long i = 0; i < tree[v].size(); i++) {
    if (tree[v][i] != par) dfs(tree[v][i], cnt2, cnt1, v);
  }
}
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n - 1; i++) {
    long long temp, temp1;
    cin >> temp >> temp1;
    tree[temp].push_back(temp1);
    tree[temp1].push_back(temp);
  }
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++) cin >> goal[i];
  dfs(1);
  cout << ans.size() << "\n";
  for (long long i = 0; i < ans.size(); i++) cout << ans[i] << "\n";
}
