Iahub is very proud of his recent discovery, propagating trees. Right now, he invented a new tree, called xor-tree. After this new revolutionary discovery, he invented a game for kids which uses xor-trees.

The game is played on a tree having *n* nodes, numbered from 1 to *n*. Each node *i* has an initial value *init*<sub class="lower-index">*i*</sub>, which is either 0 or 1. The root of the tree is node 1.

One can perform several (possibly, zero) operations on the tree during the game. The only available type of operation is to pick a node *x*. Right after someone has picked node *x*, the value of node *x* flips, the values of sons of *x* remain the same, the values of sons of sons of *x* flips, the values of sons of sons of sons of *x* remain the same and so on.

The goal of the game is to get each node *i* to have value *goal*<sub class="lower-index">*i*</sub>, which can also be only 0 or 1. You need to reach the goal of the game by using minimum number of operations.
The first line contains an integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>). Each of the next *n* - 1 lines contains two integers *u*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub> (1 ≤ *u*<sub class="lower-index">*i*</sub>, *v*<sub class="lower-index">*i*</sub> ≤ *n*; *u*<sub class="lower-index">*i*</sub> ≠ *v*<sub class="lower-index">*i*</sub>) meaning there is an edge between nodes *u*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub>. 

The next line contains *n* integer numbers, the *i*-th of them corresponds to *init*<sub class="lower-index">*i*</sub> (*init*<sub class="lower-index">*i*</sub> is either 0 or 1). The following line also contains *n* integer numbers, the *i*-th number corresponds to *goal*<sub class="lower-index">*i*</sub> (*goal*<sub class="lower-index">*i*</sub> is either 0 or 1).
#include <bits/stdc++.h>
using namespace std;

#define FOR(i, x, n) for(ll i = x; i < n; i++) 
#define pb push_back
#define ll long long
#define hii cerr << "hii" << endl
#define pii pair<int, int>
#define pll pair<ll, ll>
#define int ll
#define mpp make_pair
#define endl '\n'
#define ff first 
#define ss second
#define all(s) s.begin(), s.end()
#define fuck_you_scanf ios_base:: sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define si size()

const int mod = 1e9 + 7;
const int N = 3*100005;
const int MAX = 5000;
const int N1 = 1005;

int n;
vector<int> v[N];

int DP[N][2], a[N], b[N];
int cnt;
vector<int> ret;

void dfs(int sv, int par, int lvl)
{
    for(int x : v[sv])
    {
        if(x == par) continue;
        
        DP[x][0] = DP[sv][0];
        DP[x][1] = DP[sv][1];
        
        if(lvl % 2 == 0)
        {
            if(DP[x][1] == 1)
            {
                a[x] = !a[x];
                if(a[x] != b[x])
                {
                    cnt++;
                    ret.pb(x);
                    DP[x][1] = 0;
                    dfs(x, sv, lvl + 1);
                }
                else
                {
                    dfs(x, sv, lvl + 1);
                }
            }
            else
            {
                if(a[x] != b[x])
                {
                    cnt++;
                    ret.pb(x);
                    DP[x][1] = 1;
                    dfs(x, sv, lvl + 1);
                }
                else
                {
                    dfs(x, sv, lvl + 1);
                }
            }
        }
        else
        {
            if(DP[x][0] == 1)
            {
                a[x] = !a[x];
                if(a[x] != b[x])
                {
                    cnt++;
                    ret.pb(x);
                    DP[x][0] = 0;
                    dfs(x, sv, lvl + 1);
                }
                else
                {
                    dfs(x, sv, lvl + 1);
                }
            }
            else
            {
                if(a[x] != b[x])
                {
                    cnt++;
                    ret.pb(x);
                    DP[x][0] = 1;
                    dfs(x, sv, lvl + 1);
                }
                else
                {
                    dfs(x, sv, lvl + 1);
                }
            }
        }
    }
}


int32_t main()
{
    cin >> n;
    int t = n - 1;
    while(t--)
    {
        int a, b;
        cin >> a >> b;
        v[a].pb(b);
        v[b].pb(a);
    }
    
    FOR(i, 0, n) cin >> a[i + 1];
    FOR(i, 0, n) cin >> b[i + 1];
    
    if(a[1] != b[1])
    {
        cnt++;
        ret.pb(1);
        DP[1][1] = 1;
        DP[1][0] = 0;
    }
    
    dfs(1, 0, 1);
    
    cout << cnt << endl;
    
    for(int x : ret)
    {
        cout << x << endl;
    }
    
}