#include <bits/stdc++.h>
using namespace ::std;
vector<int> G[100005];
int R[100005], A[100005], B[100005];
bool visit[100005], marca[100005], marca2[100005];
int n, a, b, resp = 0;
void cambio(int x) {
  if (A[x] == 0)
    A[x] = 1;
  else
    A[x] = 0;
}
void dfs(int x) {
  visit[x] = true;
  stack<int> P;
  P.push(x);
  while (!P.empty()) {
    int p = P.top();
    P.pop();
    if (A[p] != B[p]) R[resp++] = p + 1;
    for (int i = 0; i < G[p].size(); i++) {
      int s = G[p][i];
      if (!visit[s]) {
        if (A[p] != B[p]) {
          if (!marca2[p]) marca[s] = true;
        }
        if (A[p] == B[p] && marca2[p]) marca[s] = true;
        if (marca[p]) {
          marca2[s] = true;
          cambio(s);
        }
        P.push(s);
        visit[s] = true;
      }
    }
  }
}
int main(void) {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &a, &b);
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 0; i < n; i++) scanf("%d", &A[i]);
  for (int i = 0; i < n; i++) scanf("%d", &B[i]);
  dfs(0);
  cout << resp << endl;
  for (int i = 0; i < resp; i++) printf("%d\n", R[i]);
  return 0;
}
