#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<int> > graph(n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    graph[a].push_back(b);
    graph[b].push_back(a);
  }
  vector<int> ans;
  bool cnt[n], goal[n];
  for (int i = 0; i < n; i++) cin >> cnt[i];
  for (int i = 0; i < n; i++) {
    cin >> goal[i];
    goal[i] = goal[i] ^ cnt[i];
  }
  bool visited[n];
  for (int i = 0; i < n; i++) visited[i] = 0;
  queue<pair<int, int> > bfs;
  if (!goal[0])
    bfs.push(make_pair(0, 0));
  else {
    ans.push_back(0);
    bfs.push(make_pair(0, 1));
  }
  visited[0] = 1;
  while (!bfs.empty()) {
    pair<int, int> curr = bfs.front();
    bfs.pop();
    int node = curr.first;
    int b = curr.second;
    for (int i = 0; i < graph[node].size(); i++) {
      int j = graph[node][i];
      if (!visited[j]) {
        if (b == 0) {
          if (!goal[j])
            bfs.push(make_pair(j, 0));
          else {
            ans.push_back(j);
            bfs.push(make_pair(j, 1));
          }
        } else if (b == 1) {
          if (!goal[j])
            bfs.push(make_pair(j, 2));
          else {
            ans.push_back(j);
            bfs.push(make_pair(j, 3));
          }
        } else if (b == 2) {
          if (!goal[j]) {
            ans.push_back(j);
            bfs.push(make_pair(j, 0));
          } else {
            bfs.push(make_pair(j, 1));
          }
        } else if (b == 3) {
          if (!goal[j]) {
            ans.push_back(j);
            bfs.push(make_pair(j, 2));
          } else {
            bfs.push(make_pair(j, 3));
          }
        }
        visited[j] = 1;
      }
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] + 1 << endl;
}
