#include <bits/stdc++.h>
using namespace std;
vector<int> g[100003];
int n;
int a[100003];
int goal[100003];
int ans[100003];
bool flag[100003];
int coun;
void dfs(int x, int c1, int c2, int h) {
  flag[x] = true;
  if (h) {
    if ((c1 ^ a[x]) != goal[x]) {
      c1 ^= 1;
      ans[coun++] = x;
    }
  } else {
    if ((c2 ^ a[x]) != goal[x]) {
      c2 ^= 1;
      ans[coun++] = x;
    }
  }
  for (int i = 0; i < g[x].size(); i++)
    if (!flag[g[x][i]]) dfs(g[x][i], c1, c2, (h ^ 1));
}
int main() {
  scanf("%d", &n);
  int i;
  int x, y;
  for (i = 0; i < n - 1; i++) {
    scanf("%d %d", &x, &y);
    x--;
    y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < n; i++) scanf("%d", &goal[i]);
  dfs(0, 0, 0, 0);
  printf("%d\n", coun);
  for (i = 0; i < coun; i++) printf("%d\n", ans[i] + 1);
  return 0;
}
