#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6, pi = acos(-1);
const int N = 1e5 + 5, M = 1e6, OO = 0x3f3f3f3f;
int t, n, m, k;
vector<int> adj[N];
bool init[N];
bool goal[N];
vector<int> ans;
void dfs(int u, int p, bool odd, bool even, int lvl) {
  if (lvl & 1) {
    if ((init[u] ^ odd) != goal[u]) {
      ans.push_back(u + 1);
      odd ^= 1;
    }
  } else {
    if ((init[u] ^ even) != goal[u]) {
      ans.push_back(u + 1);
      even ^= 1;
    }
  }
  for (int i = 0; i < adj[u].size(); ++i) {
    int v = adj[u][i];
    if (v == p) continue;
    dfs(v, u, odd, even, lvl + 1);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u, --v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 0; i < n; ++i) scanf("%d", init + i);
  for (int i = 0; i < n; ++i) scanf("%d", goal + i);
  dfs(0, -1, 0, 0, 0);
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); ++i) printf("%d\n", ans[i]);
  return 0;
}
