#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
vector<int> G[N];
int fi[N];
int se[N];
int n;
int k;
bool used[N];
int rel[N];
struct node {
  int x;
  int step;
  node(int a, int b) {
    x = a;
    step = b;
  }
};
queue<node> Q;
void DFS(int v, int cur, int next) {
  used[v] = true;
  if (fi[v] ^ cur != se[v]) {
    cur ^= 1;
    rel[k++] = v;
  }
  for (int i = 0; i < G[v].size(); i++) {
    if (!used[G[v][i]]) {
      DFS(G[v][i], next, cur);
    }
  }
}
int main() {
  int a, b;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d %d", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &fi[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &se[i]);
  }
  memset(used, 0, sizeof(used));
  k = 0;
  DFS(1, 0, 0);
  printf("%d\n", k);
  for (int i = 0; i < k; i++) {
    printf("%d\n", rel[i]);
  }
  return 0;
}
