#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long R = 7 + 1e9, R1 = 19491001, R2 = 236, NUMTESTCASE;
const long long NN = 10 + 1e6;
const double pi = acos(-1.0);
int di[8] = {1, 0, -1, 0, 1, -1, 1, -1}, dj[8] = {0, 1, 0, -1, 1, -1, -1, 1};
int n, m, Arr[NN], Brr[NN], u, v;
vector<int> G[NN], Ans;
void Dfs(int Ver = 1, int Par = 1, int Dep = 1, int Even = 0, int Odd = 0) {
  int NextEven = Even;
  int NextOdd = Odd;
  if (Dep) {
    Arr[Ver] ^= Odd;
    if (Arr[Ver] ^ Brr[Ver]) {
      NextOdd ^= 1;
      Ans.push_back(Ver);
    }
  } else {
    Arr[Ver] ^= Even;
    if (Arr[Ver] ^ Brr[Ver]) {
      NextEven ^= 1;
      Ans.push_back(Ver);
    }
  }
  for (int u : G[Ver])
    if (u ^ Par) Dfs(u, Ver, Dep ^ 1, NextEven, NextOdd);
}
int main() {
  cin >> n;
  for (int i = (2); i <= (n); ++i) {
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = (1); i <= (n); ++i) scanf("%d", Arr + i);
  for (int i = (1); i <= (n); ++i) scanf("%d", Brr + i);
  Dfs();
  cout << Ans.size() << '\n';
  for (int u : Ans) printf("%d\n", u);
  return 0;
}
