#include <bits/stdc++.h>
using namespace std;
const int N = 305;
const int dx[] = {0, 0, -1, 1};
const int dy[] = {-1, 1, 0, 0};
int c[100005];
int n, m, cnt, init[100005];
bool w;
map<int, int> used;
vector<int> g[100005], ans;
void dfs(int v, int f, int q, int from) {
  if (f ^ init[v]) {
    ans.push_back(v);
    f ^= 1;
  }
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to != from) dfs(to, q, f, v);
  }
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) {
    cin >> init[i];
  }
  for (int i = 1; i <= n; i++) {
    int first;
    cin >> first;
    init[i] ^= first;
  }
  dfs(1, 0, 0, 0);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
}
