#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<vector<int>> g(n);
  vector<vector<int>> dp(n, vector<int>(n, inf));
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    g[a].push_back(b);
    g[b].push_back(a);
    dp[a][b] = dp[b][a] = 1;
  }
  vector<int> b;
  for (int i = 1; i < n; ++i) {
    if (g[i].size() == 1) {
      int x;
      cin >> x;
      x--;
      b.push_back(x);
    }
  }
  vector<vector<vector<int>>> path(n, vector<vector<int>>(n));
  for (int i = 0; i < n; ++i) {
    dp[i][i] = 0;
    path[i][i].emplace_back(i);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (dp[i][j] == 1) {
        path[i][j].emplace_back(i);
        path[i][j].emplace_back(j);
      }
    }
  }
  for (int k = 0; k < n; ++k) {
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) {
        if (dp[i][j] > dp[i][k] + dp[k][j]) {
          dp[i][j] = dp[i][k] + dp[k][j];
          vector<int> p;
          for (int v : path[i][k]) {
            p.emplace_back(v);
          }
          p.pop_back();
          for (int v : path[k][j]) {
            p.emplace_back(v);
          }
          path[i][j] = p;
        }
      }
    }
  }
  vector<int> ans_list;
  int start = 0;
  for (int u : b) {
    for (int v : path[start][u]) {
      ans_list.emplace_back(v);
    }
    ans_list.pop_back();
    start = u;
  }
  for (int v : path[start][0]) {
    ans_list.emplace_back(v);
  }
  if (ans_list.size() > 2 * n - 1) {
    cout << -1 << '\n';
    return 0;
  }
  for (int v : ans_list) {
    cout << v + 1 << " ";
  }
  cout << '\n';
  return 0;
}
