#include <bits/stdc++.h>
using namespace std;
int const N = 2 * 1e5 + 5;
int const md = 1e9 + 7;
int i, j, n, m, k, z, y, x, t, mi, ma;
int a[N], b[N];
vector<int> v[N], ans;
long long dp[N];
char st[N];
void dfs(int i, int pr, int kol1, int kol2) {
  int t = (a[i] + kol1) % 2;
  if (t != b[i]) ans.push_back(i);
  for (int j = 0; j < (int)v[i].size(); j++) {
    int to = v[i][j];
    if (to != pr) {
      if (t != b[i])
        dfs(to, i, kol2, kol1 + 1);
      else
        dfs(to, i, kol2, kol1);
    }
  }
}
int main() {
  scanf("%d", &n);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) scanf("%d", &b[i]);
  dfs(1, 0, 0, 0);
  printf("%d\n", ans.size());
  for (i = 0; i < (int)ans.size(); i++) printf("%d\n", ans[i]);
}
