#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500000;
int n;
bool seq[MAXN], goal[MAXN];
vector<int> node[MAXN], ans;
void DFS(int curr, int parent, bool cpar, bool opar) {
  if (seq[curr] ^ goal[curr] != cpar) {
    cpar = !cpar;
    ans.push_back(curr);
  }
  for (int a = 0; a < node[curr].size(); a++)
    if (node[curr][a] != parent) DFS(node[curr][a], curr, opar, cpar);
}
int main() {
  ios_base::sync_with_stdio(false);
  scanf("%i", &n);
  for (int a = 0, b, c; a < n - 1; a++) {
    scanf("%i%i", &b, &c);
    node[b - 1].push_back(c - 1);
    node[c - 1].push_back(b - 1);
  }
  for (int a = 0, b; a < n; a++) {
    scanf("%i", &b);
    seq[a] = b;
  }
  for (int a = 0, b; a < n; a++) {
    scanf("%i", &b);
    goal[a] = b;
  }
  DFS(0, -1, false, false);
  printf("%i\n", ans.size());
  for (int a = 0; a < ans.size(); a++) printf("%i\n", ans[a] + 1);
  return 0;
}
