#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int N = 1e6 + 9;
long long vis[N];
vector<long long> v[N], ans;
map<long long, long long> m1, m2;
bool cmp(const pair<double, long long> &a, const pair<double, long long> &b) {
  if (a.first == b.first) {
    return a.second < b.second;
  }
  return a.first < b.first;
}
void dfs(long long a, long long b, long long prev) {
  vis[a] = 1;
  m1[a] = m1[a] ^ b;
  if (m1[a] != m2[a]) {
    b ^= 1;
    ans.push_back(a);
  }
  for (int i = 0; i < v[a].size(); i++) {
    if (vis[v[a][i]] == 0) {
      dfs(v[a][i], prev, b);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, a, b, k, p;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 0; i < n; i++) {
    cin >> k;
    m1[i + 1] = k;
  }
  for (int i = 0; i < n; i++) {
    cin >> p;
    m2[i + 1] = p;
  }
  memset(vis, 0, sizeof(vis));
  dfs(1, 0, 0);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
