#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;
const int NMax = 1e5 + 5;
const ll inf_ll = 1e18 + 5;
const int inf_int = 1e9 + 5;
const int mod = 100003;
using zint = int;
vector<int> adj[NMax];
void dfs(int node, int dad, int depthXor, vector<int> levelXor,
         vector<int>& sol, const vector<int>& init, const vector<int>& goal) {
  if ((init[node] ^ levelXor[depthXor]) != goal[node]) {
    levelXor[depthXor] ^= 1;
    sol.push_back(node);
  }
  for (int nxt : adj[node]) {
    if (nxt == dad) {
      continue;
    }
    dfs(nxt, node, depthXor ^ 1, levelXor, sol, init, goal);
  }
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  for (int i = 1; i < N; ++i) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  vector<int> init(N + 1), goal(N + 1);
  for (int i = 1; i <= N; ++i) {
    cin >> init[i];
  }
  for (int i = 1; i <= N; ++i) {
    cin >> goal[i];
  }
  vector<int> sol;
  dfs(1, 0, 0, vector<int>(2, 0), sol, init, goal);
  cout << sol.size() << '\n';
  for (auto val : sol) {
    cout << val << '\n';
  }
  return 0;
}
