#include <bits/stdc++.h>
using namespace std;
const int maxn = 10000;
vector<pair<int, int> > adj[maxn];
vector<int> ans, c;
int a[maxn], st[maxn], fn[maxn], t, b[maxn], minval[maxn], maxval[maxn], cnt,
    inf = 100000, n;
bool mark[maxn];
void dfs0(int v) {
  mark[v] = 1;
  bool b = 1;
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i].second;
    if (!mark[u]) {
      b = 0;
      dfs0(u);
    }
  }
  if (b) cnt++;
  return;
}
void dfs1(int v) {
  mark[v] = 0;
  st[v] = t++;
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i].second;
    if (mark[u]) {
      dfs1(u);
      maxval[v] = max(maxval[v], maxval[u]);
      minval[v] = min(minval[v], minval[u]);
    }
  }
  fn[v] = t;
  return;
}
void dfs2(int v) {
  ans.push_back(v + 1);
  bool b = 1;
  mark[v] = 1;
  sort(adj[v].begin(), adj[v].end());
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i].second;
    if (!mark[u]) {
      b = 0;
      dfs2(u);
      ans.push_back(v + 1);
    }
  }
  if (b) c.push_back(minval[v]);
  return;
}
void add(int v, int u) {
  adj[v].push_back(make_pair(minval[u], u));
  adj[u].push_back(make_pair(minval[v], v));
  return;
}
int main() {
  int v, u;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> a[i] >> b[i];
    a[i]--, b[i]--;
    add(a[i], b[i]);
  }
  dfs0(0);
  for (int i = 0; i < n; i++) minval[i] = inf, maxval[i] = -1;
  for (int i = 0; i < cnt; i++) {
    cin >> v;
    v--;
    maxval[v] = minval[v] = i;
  }
  dfs1(0);
  for (int i = 0; i < n; i++) adj[i].clear();
  for (int i = 0; i < n - 1; i++) add(a[i], b[i]);
  dfs2(0);
  for (int i = 1; i < cnt; i++)
    if (c[i] < c[i - 1]) {
      cout << -1 << endl;
      return 0;
    }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
