#include <bits/stdc++.h>
using namespace std;
bool g[300][300];
int n;
int x, y, cnt;
bool f = false;
vector<int> eg[300];
vector<int> v, now, ans, l[300];
void dfs(int fv, int nv, int mu) {
  for (int i = 0; i < eg[nv].size(); i++) {
    if (eg[nv][i] == fv) continue;
    l[cnt].push_back(eg[nv][i]);
    if (eg[nv][i] == mu) f = true;
    if (f == true) return;
    dfs(nv, eg[nv][i], mu);
    if (f == true) return;
    l[cnt].erase(l[cnt].begin() + l[cnt].size() - 1);
  }
  return;
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    x--, y--;
    eg[x].push_back(y);
    eg[y].push_back(x);
  }
  int k;
  for (int i = 1; i < n; i++)
    if (eg[i].size() == 1) {
      cin >> k;
      k--;
      v.push_back(k);
    }
  for (int i = 0; i < v.size(); i++) {
    f = false;
    l[i].push_back(0);
    dfs(-1, 0, v[i]);
    cnt++;
  }
  ans = l[0];
  for (int i = 1; i < v.size(); i++) {
    vector<int> ans1 = ans;
    int j = 0;
    for (; j < min(l[i - 1].size(), l[i].size()); j++) {
      if (l[i - 1][j] != l[i][j]) break;
    }
    for (int k = l[i - 1].size() - 2; k >= j - 1; k--)
      ans.push_back(l[i - 1][k]);
    for (int k = j; k < l[i].size(); k++) ans.push_back(l[i][k]);
  }
  for (int i = l[v.size() - 1].size() - 2; i >= 0; i--)
    ans.push_back(l[v.size() - 1][i]);
  if (ans.size() != 2 * n - 1)
    cout << -1;
  else
    for (int i = 0; i < ans.size(); i++) cout << ans[i] + 1 << " ";
  return 0;
}
