#include <bits/stdc++.h>
using namespace std;
const long long maxs = 1e5 + 5;
const long long lmaxs = 20;
long long mod = 1e9 + 7;
long long oo = 1e15;
void pre() {}
long long n;
vector<long long> tree[maxs];
long long a[maxs];
long long goal[maxs];
long long lvl[maxs];
vector<long long> ans;
void dfs(long long s, long long p = -1, long long e = 0, long long o = 0) {
  if (lvl[s] & 1) {
    if (a[s] ^ o != goal[s]) {
      ans.push_back(s);
      o ^= 1;
    }
  } else {
    if (a[s] ^ e != goal[s]) {
      ans.push_back(s);
      e ^= 1;
    }
  }
  for (auto d : tree[s]) {
    if (d != p) {
      lvl[d] = lvl[s] + 1;
      dfs(d, s, e, o);
    }
  }
}
void solve() {
  cin >> n;
  for (long long i = 0; i < n - 1; i++) {
    long long s, d;
    cin >> s >> d;
    tree[s].push_back(d);
    tree[d].push_back(s);
  }
  for (long long i = 1; i < n + 1; i++) cin >> a[i];
  for (long long i = 1; i < n + 1; i++) {
    cin >> goal[i];
  }
  dfs(1);
  cout << ans.size() << '\n';
  for (auto it : ans) cout << it << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ;
  pre();
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
