#include <bits/stdc++.h>
using namespace std;
int n, a, b, s[310], f[310], l[310], cnt;
bool vis[310][310];
vector<vector<int>> v, p;
vector<int> cur, ans;
bool ok = 1;
void dfs(int k, int from) {
  cur.push_back(k);
  p[k] = cur;
  for (int i = 0; i < v[k].size(); i++)
    if (v[k][i] != from) {
      dfs(v[k][i], k);
      f[v[k][i]] = k;
    }
  cur.pop_back();
}
void check(int k, int x) {
  ans.push_back(k);
  if (cur == p[s[x]]) x++;
  if (x == cnt) return;
  if (cur.size() < p[s[x]].size() &&
      cur[cur.size() - 1] == p[s[x]][cur.size() - 1]) {
    if (vis[p[s[x]][cur.size() - 1]][p[s[x]][cur.size()]]) ok = 0;
    vis[p[s[x]][cur.size() - 1]][p[s[x]][cur.size()]] = 1;
    cur.push_back(p[s[x]][cur.size()]);
    check(p[s[x]][cur.size() - 1], x);
  } else {
    if (vis[k][f[k]]) ok = 0;
    vis[k][f[k]] = 1;
    cur.pop_back();
    check(f[k], x);
  }
}
void solve() {
  cin >> n;
  cnt = n;
  v.resize(n);
  p.resize(n);
  l[0] = 1;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--, b--;
    if (l[a] == 1) cnt--, l[a] = 2;
    if (l[a] == 0) l[a] = 1;
    if (l[b] == 1) cnt--, l[b] = 2;
    if (l[b] == 0) l[b] = 1;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 0; i < cnt; i++) {
    cin >> s[i];
    s[i]--;
  }
  cnt++;
  s[cnt - 1] = 0;
  dfs(0, -1);
  cur.push_back(0);
  check(0, 0);
  if (ok) {
    for (int i = 0; i < ans.size(); i++) cout << ans[i] + 1 << ' ';
  } else
    cout << -1;
}
int main() {
  int T;
  T = 1;
  while (T--) solve();
  return 0;
}
