#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
bool layer[100050];
vector<vector<int> > v(100050);
queue<pair<int, int> > q;
pair<int, int> cur;
vector<int> mem;
bool vis[100005];
void dfs(int node, int cnt1, int cnt2) {
  vis[node] = 1;
  for (int i = 0; i < v[node].size(); i++) {
    int u = v[node][i];
    if (!vis[u]) {
      if (layer[u] == 1) {
        if (cnt1 % 2 == 0) {
          if (a[u] != b[u]) {
            mem.push_back(u);
            dfs(u, cnt1 + 1, cnt2);
          } else
            dfs(u, cnt1, cnt2);
        } else {
          if (a[u] == b[u]) {
            mem.push_back(u);
            dfs(u, cnt1 + 1, cnt2);
          } else
            dfs(u, cnt1, cnt2);
        }
      }
      if (layer[u] == 0) {
        if (cnt2 % 2 == 0) {
          if (a[u] != b[u]) {
            mem.push_back(u);
            dfs(u, cnt1, cnt2 + 1);
          } else
            dfs(u, cnt1, cnt2);
        } else {
          if (a[u] == b[u]) {
            mem.push_back(u);
            dfs(u, cnt1, cnt2 + 1);
          } else
            dfs(u, cnt1, cnt2);
        }
      }
    }
  }
}
void bfs() {
  while (!q.empty()) {
    cur = q.front();
    layer[cur.first] = !cur.second;
    q.pop();
    vis[cur.first] = 1;
    for (int i = 0; i < v[cur.first].size(); i++)
      if (!vis[v[cur.first][i]]) {
        q.push(make_pair(v[cur.first][i], 1 - cur.second));
      }
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  q.push(make_pair(1, 0));
  bfs();
  memset(vis, 0, sizeof(vis));
  if (a[1] != b[1]) mem.push_back(1);
  dfs(1, (a[1] != b[1]), 0);
  cout << mem.size() << endl;
  for (int i = 0; i < mem.size(); i++) cout << mem[i] << '\n';
  return 0;
}
