#include <bits/stdc++.h>
using namespace std;
void dfs(int node, int par, int gp, int p, vector<int> adj[], vector<int> &src,
         vector<int> &dest, vector<int> &ans) {
  if (gp % 2 != 0) {
    src[node - 1] = !src[node - 1];
  }
  if (src[node - 1] != dest[node - 1]) {
    ans.push_back(node);
    int temp = p;
    p = gp + 1;
    gp = temp;
  } else {
    int temp = p;
    p = gp;
    gp = temp;
  }
  for (int i = 0; i < adj[node].size(); i++) {
    if (adj[node][i] != par) {
      dfs(adj[node][i], node, gp, p, adj, src, dest, ans);
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> adj[n + 1];
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  vector<int> src(n);
  vector<int> dest(n);
  for (int i = 0; i < n; i++) cin >> src[i];
  for (int i = 0; i < n; i++) cin >> dest[i];
  vector<int> ans;
  dfs(1, -1, 0, 0, adj, src, dest, ans);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
}
