#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
vector<int> node[100002];
int goal[100002];
int now[100002], n;
int cnt[100002];
int ffa[100002];
void dfs(int cur, int fa) {
  cnt[cur] += cnt[ffa[ffa[cur]]];
  int Xor = cnt[cur] % 2;
  if ((now[cur] ^ Xor) != goal[cur]) {
    cnt[cur]++;
    ans.push_back(cur);
  }
  for (int i = 0; i < node[cur].size(); i++)
    if (node[cur][i] != fa) {
      ffa[node[cur][i]] = cur;
      dfs(node[cur][i], cur);
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    node[u].push_back(v);
    node[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &now[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &goal[i]);
  ffa[1] = 0;
  dfs(1, 0);
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) printf("%d\n", ans[i]);
}
