#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200001];
vector<int> v;
int dis[200001];
bool vis[200001];
long long ans = 0, mx = 0, n;
int even[1000001], odd[100011], good[100001], arr[100001];
void dfs(int s) {
  vis[s] = true;
  if (dis[s] % 2) {
    if (odd[s] % 2) arr[s] = arr[s] ^ 1;
    if (arr[s] != good[s]) {
      odd[s]++;
      v.push_back(s);
    }
  } else {
    if (even[s] % 2) arr[s] = arr[s] ^ 1;
    if (arr[s] != good[s]) {
      even[s]++;
      v.push_back(s);
    }
  }
  for (int i = 0; i < adj[s].size(); i++) {
    if (!vis[adj[s][i]]) {
      dis[adj[s][i]] = dis[s] + 1;
      odd[adj[s][i]] = odd[s];
      even[adj[s][i]] = even[s];
      dfs(adj[s][i]);
    }
  }
  return;
}
int main() {
  int x, y;
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) cin >> arr[i];
  for (int i = 1; i <= n; i++) cin >> good[i];
  dis[1] = 1;
  dfs(1);
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << endl;
  return 0;
}
