#include <bits/stdc++.h>
using namespace std;
const int MxN = int(1e5);
int n, visit[MxN + 5];
vector<int> adj[MxN + 5], init, goal, changes;
void dfs(int a, int level, int b, int c) {
  if (level % 2 == 0) {
    if ((init[a] ^ b) != goal[a]) {
      b ^= 1;
      changes.push_back(a);
    }
  } else {
    if ((init[a] ^ c) != goal[a]) {
      c ^= 1;
      changes.push_back(a);
    }
  }
  for (auto u : adj[a]) {
    if (visit[u]) continue;
    visit[u] = 1;
    dfs(u, level + 1, b, c);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  init.assign(n + 1, 0);
  goal.assign(n + 1, 0);
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    adj[b].push_back(a);
    adj[a].push_back(b);
  }
  for (int i = 1; i <= n; i++) {
    cin >> init[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> goal[i];
  }
  visit[1] = 1;
  dfs(1, 0, 0, 0);
  cout << changes.size() << "\n";
  for (int i = 0; i < (int)changes.size(); i++) {
    cout << changes[i] << "\n";
  }
}
