#include <bits/stdc++.h>
using namespace std;
vector<int> adj[100011], ans;
bool ini_col[100011];
bool t_col[100011];
bool vis[100011];
void dfs(int u, int even, int odd, int level) {
  vis[u] = 1;
  if (level % 2) {
    if (!(odd % 2)) {
      if (ini_col[u] != t_col[u]) {
        ans.push_back(u);
        odd++;
      }
    } else {
      if (ini_col[u] == t_col[u]) {
        ans.push_back(u);
        odd++;
      }
    }
  } else {
    if (!(even % 2)) {
      if (ini_col[u] != t_col[u]) {
        ans.push_back(u);
        even++;
      }
    } else {
      if (ini_col[u] == t_col[u]) {
        ans.push_back(u);
        even++;
      }
    }
  }
  for (int i = 0; i < adj[u].size(); ++i) {
    if (!vis[adj[u][i]]) dfs(adj[u][i], even, odd, level + 1);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 0; i < n; ++i) cin >> ini_col[i + 1];
  for (int i = 0; i < n; ++i) cin >> t_col[i + 1];
  dfs(1, 0, 0, 0);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
}
