#include <bits/stdc++.h>
using namespace std;
int n, vis[100000], a[100000], b[100000], c[100000], l, p[100000], ans[100000],
    anw[100000];
vector<int> v[100000];
queue<int> q;
void bfs(int src) {
  q.push(src);
  vis[src] = 1;
  c[src] = a[src] ^ b[src];
  p[src] = src;
  int x = 0;
  if (c[src]) {
    ans[x++] = src;
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 0; i < v[u].size(); ++i) {
      if (!vis[v[u][i]]) {
        p[v[u][i]] = u;
        vis[v[u][i]] = 1;
        q.push(v[u][i]);
        if (c[p[u]] ^ a[v[u][i]] != b[v[u][i]] && u != src) {
          ans[x++] = v[u][i];
          c[v[u][i]] = 1 ^ c[p[u]];
        } else if (u != src) {
          c[v[u][i]] = c[p[u]];
        } else {
          c[v[u][i]] = a[v[u][i]] ^ b[v[u][i]];
          if (c[v[u][i]]) {
            ans[x++] = v[u][i];
          }
        }
      }
    }
  }
  cout << x << endl;
  for (int i = 0; i < x; ++i) {
    cout << ans[i] + 1 << endl;
  }
}
int main() {
  cin >> n;
  for (int i = 1, x, y; i < n; ++i) {
    scanf("%d%d", &x, &y);
    --x;
    --y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &b[i]);
  }
  bfs(0);
  return 0;
}
