#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323;
const double EPS = 1e-12;
const int N = 1e6 + 5;
const int MOD = 1e9 + 7;
std::vector<long long int> v[N], ans;
bool visit[N];
long long int val[N], goal[N];
void dfs(long long int node, long long int nxt, long long int nxtnxt) {
  visit[node] = 1;
  long long int t = nxtnxt;
  nxtnxt = 0;
  if (nxt) {
    val[node] ^= 1;
    nxtnxt = nxt;
  }
  if (goal[node] != val[node]) {
    val[node] ^= 1;
    nxtnxt ^= 1;
    ans.push_back(node);
  }
  nxt = t;
  for (auto i : v[node]) {
    if (!visit[i]) {
      dfs(i, nxt, nxtnxt);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    long long int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) cin >> val[i];
  for (int i = 1; i <= n; i++) cin >> goal[i];
  dfs(1, 0, 0);
  cout << (int)ans.size() << "\n";
  for (auto i : ans) cout << i << "\n";
  return 0;
}
