#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 5e5 + 10;
int val[N], leaf[N], f[N];
vector<int> ans, v[N];
void dfs(int s, int p = 0) {
  for (auto it : v[s]) {
    if (it == p) continue;
    dfs(it, s);
    val[s] = min(val[s], val[it]);
  }
}
bool cmp(const int &a, const int &b) { return val[a] < val[b]; }
void traverse(int s, int p = 0) {
  ans.push_back(s);
  sort(v[s].begin(), v[s].end(), cmp);
  for (auto it : v[s]) {
    if (it == p) continue;
    traverse(it, s);
    ans.push_back(s);
  }
}
void printN() {
  puts("-1");
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) val[i] = 1e9;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  int cnt = 0;
  for (int i = 2; i <= n; i++) {
    if ((int)v[i].size() == 1) {
      cnt++;
    }
  }
  for (int i = 1; i <= cnt; i++) {
    cin >> leaf[i];
    f[leaf[i]] = 1;
    val[leaf[i]] = i;
  }
  dfs(1);
  traverse(1);
  int indx = 1;
  for (auto it : ans) {
    if (f[it]) {
      if (it != leaf[indx]) {
        printN();
      }
      indx++;
    }
  }
  for (auto it : ans) cout << it << ' ';
  cout << '\n';
  return 0;
}
