#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 5;
int n;
vector<int> adj[maxN];
bool flip[maxN], init[maxN], goal[maxN], vis[maxN];
void dfs(int u, bool f1, bool f2) {
  vis[u] = 1;
  bool curflip = 0;
  if ((init[u] ^ f1) != goal[u]) curflip = 1;
  if (curflip) flip[u] = 1;
  for (int i = 0; i <= ((int)(adj[u].size())) - 1; ++i) {
    int v = adj[u][i];
    if (!vis[v]) dfs(v, f2, f1 ^ curflip);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (int i = 1; i <= n; ++i) {
    cin >> init[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> goal[i];
  }
  dfs(1, 0, 0);
  int count = 0;
  for (int i = 1; i <= n; ++i) {
    if (flip[i]) count++;
  }
  cout << count << "\n";
  for (int i = 1; i <= n; ++i) {
    if (flip[i]) cout << i << "\n";
  }
}
