#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e6, mod = 1000000007, inf = 100000007;
long long n, m, x, y, d, z, sum, b[MAXN];
bool a[2][MAXN];
vector<long long> v[MAXN], ans;
bool mark[MAXN], seen[MAXN];
void dfs(long long x, long long h, long long white, long long black) {
  mark[x] = true;
  if (h % 2 == 0 && a[1][x] != a[2][x]) {
    if (white % 2 == 0) {
      white++;
      ans.push_back(x);
    }
  } else if (h % 2 == 0 && a[1][x] == a[2][x]) {
    if (white % 2 == 1) {
      white++;
      ans.push_back(x);
    }
  } else if (h % 2 == 1 && a[1][x] != a[2][x]) {
    if (black % 2 == 0) {
      black++;
      ans.push_back(x);
    }
  } else if (h % 2 == 1 && a[1][x] == a[2][x]) {
    if (black % 2 == 1) {
      black++;
      ans.push_back(x);
    }
  }
  for (int i = 0; i < v[x].size(); i++) {
    if (!mark[v[x][i]]) {
      dfs(v[x][i], h + 1, white, black);
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[1][i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[2][i];
  }
  dfs(1, 0, 0, 0);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
}
