#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000;
int bin[2][maxn];
int n;
vector<int> resp;
int mark[maxn];
vector<int> adj[maxn];
void dfs(int node, int par, int imp, int dep) {
  if (mark[node] > 0) return;
  mark[node] = 1;
  if (dep & 1) {
    if ((bin[0][node] ^ imp) != bin[1][node]) {
      resp.push_back(node);
      imp ^= 1;
    }
  } else {
    if ((bin[0][node] ^ par) != bin[1][node]) {
      resp.push_back(node);
      par ^= 1;
    }
  }
  for (int(i) = (0); (i) < ((int)adj[node].size()); ++(i)) {
    int next = adj[node][i];
    dfs(next, par, imp, dep + 1);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> n) {
    resp.clear();
    for (int(i) = (0); (i) < (maxn); ++(i)) adj[i].clear();
    for (int(i) = (1); (i) < (n); ++(i)) {
      int a, b;
      cin >> a >> b;
      a--;
      b--;
      adj[a].push_back(b);
      adj[b].push_back(a);
    }
    for (int(kk) = (0); (kk) < (2); ++(kk))
      for (int(i) = (0); (i) < (n); ++(i)) cin >> bin[kk][i];
    memset(mark, 0, sizeof(mark));
    dfs(0, 0, 0, 0);
    sort(resp.begin(), resp.end());
    cout << resp.size() << endl;
    for (int(i) = (0); (i) < ((int)resp.size()); ++(i)) {
      cout << (resp[i] + 1) << endl;
    }
  }
  return 0;
}
