#include <bits/stdc++.h>
using namespace std;
vector<int> ans, E[120000];
int aim[120000], a[120000], x, n, i, y;
void dfs(int x, int v0, int v1, int ff) {
  if (a[x] ^ v0 != aim[x]) {
    v0 ^= 1;
    ans.push_back(x);
  }
  for (int i = 0; i < E[x].size(); ++i)
    if (E[x][i] != ff) {
      dfs(E[x][i], v1, v0, x);
    }
}
int main() {
  scanf("%d", &n);
  for (i = 1; i < n; ++i) {
    scanf("%d%d", &x, &y);
    E[x].push_back(y);
    E[y].push_back(x);
  }
  for (i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (i = 1; i <= n; ++i) scanf("%d", &aim[i]);
  dfs(1, 0, 0, 0);
  printf("%d\n", ans.size());
  for (i = 0; i < ans.size(); ++i) printf("%d\n", ans[i]);
}
