#include <bits/stdc++.h>
using namespace std;
vector<int> adj[110000];
bool fr[110000 + 1];
bool ischange[110000], ok[110000];
int fa[110000], init[110000], goal[110000], n, res;
void dfs(int u) {
  if (adj[u].size() == 0) return;
  fr[u] = 0;
  int x = fa[u];
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (fr[v]) {
      fa[v] = u;
      if (init[v] == goal[v]) {
        ischange[v] = 0;
        if (ischange[x]) ok[v] = 1, res++;
      } else {
        ischange[v] = 1;
        if (ischange[x] == 0) ok[v] = 1, res++;
      }
      dfs(v);
    }
  }
}
int main() {
  cin >> n;
  memset(fr, 1, sizeof(fr));
  memset(fa, 0, sizeof(fa));
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &init[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &goal[i]);
  ischange[1] = init[1] != goal[1];
  ok[1] = ischange[1];
  res = ok[1];
  ischange[0] = 0;
  dfs(1);
  cout << res << endl;
  for (int i = 1; i <= n; i++)
    if (ok[i]) cout << i << endl;
}
