#include <bits/stdc++.h>
using namespace std;
const int N = 100 * 1000 + 10;
vector<int> v[N];
int par[N];
int gp[N];
bool mark[N];
pair<int, int> p[N];
int t = 0, ans[N];
void dfs(int u) {
  mark[u] = true;
  for (int i = 0; i < v[u].size(); i++) {
    if (mark[v[u][i]] == false) {
      par[v[u][i]] = u;
      gp[v[u][i]] = par[u];
      dfs(v[u][i]);
    }
  }
}
void dfs2(int u) {
  mark[u] = true;
  if (gp[u] == -1) {
    if (p[u].first != p[u].second) ans[t++] = u;
  } else {
    if (p[u].first == p[u].second && p[gp[u]].first != p[gp[u]].second)
      ans[t++] = u;
    if (p[u].first != p[u].second && p[gp[u]].first == p[gp[u]].second)
      ans[t++] = u;
  }
  for (int i = 0; i < v[u].size(); i++) {
    if (mark[v[u][i]] == false) {
      dfs2(v[u][i]);
    }
  }
}
int main() {
  par[0] = -1;
  gp[0] = -1;
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    v[a - 1].push_back(b - 1);
    v[b - 1].push_back(a - 1);
  }
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
  }
  for (int i = 0; i < n; i++) {
    cin >> p[i].second;
  }
  dfs(0);
  for (int i = 0; i < n; i++) {
    mark[i] = false;
  }
  dfs2(0);
  cout << t << endl;
  for (int i = 0; i < t; i++) {
    cout << ans[i] + 1 << endl;
  }
}
