#include <bits/stdc++.h>
using namespace std;
void dfs(vector<vector<long long int> > &vec, vector<long long int> &init,
         vector<long long int> &goal, long long int node, long long int level,
         long long int flipping1, long long int flipping2,
         vector<long long int> &visited, vector<long long int> &ans) {
  if (level % 2 == 1) {
    if ((init[node] ^ flipping1) != goal[node]) {
      if (flipping1)
        flipping1 = 0;
      else
        flipping1 = 1;
      ans.push_back(node);
    }
  } else if (level % 2 == 0) {
    if ((init[node] ^ flipping2) != goal[node]) {
      if (flipping2)
        flipping2 = 0;
      else
        flipping2 = 1;
      ans.push_back(node);
    }
  }
  visited[node] = 1;
  long long int size = vec[node].size();
  for (long long int i = 0; i < size; i++) {
    if (visited[vec[node][i]] == 0) {
      dfs(vec, init, goal, vec[node][i], level + 1, flipping1, flipping2,
          visited, ans);
    }
  }
}
int main() {
  long long int n;
  cin >> n;
  vector<vector<long long int> > vec(n + 1);
  for (long long int i = 1; i <= n - 1; i++) {
    long long int a, b;
    cin >> a >> b;
    vec[a].push_back(b);
    vec[b].push_back(a);
  }
  vector<long long int> init(n + 1, 0), goal(n + 1, 0);
  for (long long int i = 1; i <= n; i++) cin >> init[i];
  for (long long int i = 1; i <= n; i++) cin >> goal[i];
  vector<long long int> ans, visited(n + 1, 0);
  dfs(vec, init, goal, 1, 1, 0, 0, visited, ans);
  cout << ans.size() << endl;
  for (long long int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
}
