#include <bits/stdc++.h>
using namespace std;
const int mxn = 100000 + 10;
int n, par[mxn], cnt[mxn + 2];
bool init[mxn], gl[mxn];
vector<int> e[mxn];
vector<int> fl;
void dfs(int r, int p) {
  par[r] = p;
  for (int i = 0; i < e[r].size(); i++) {
    int u = e[r][i];
    if (u != p) {
      cnt[u] = cnt[p];
      if (init[u] != gl[u] && cnt[u] % 2 == 0) {
        cnt[u]++;
        fl.push_back(u);
      } else if (init[u] == gl[u] && cnt[u] % 2 == 1) {
        cnt[u]++;
        fl.push_back(u);
      }
      dfs(u, r);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int ui, vi;
    cin >> ui >> vi;
    ui--;
    vi--;
    e[ui].push_back(vi);
    e[vi].push_back(ui);
  }
  for (int i = 0; i < n; i++) {
    cin >> init[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> gl[i];
  }
  cnt[-1] = 0;
  cnt[-2] = 0;
  if (init[0] != gl[0]) {
    cnt[0]++;
    fl.push_back(0);
  }
  dfs(0, -1);
  cout << fl.size() << "\n";
  for (int i = 0; i < fl.size(); i++) {
    cout << fl[i] + 1 << "\n";
  }
  cout << endl;
  return 0;
}
