#include <bits/stdc++.h>
using namespace std;
vector<int> L[301], path[301], aux;
int leafs[301];
void dfs(int pos, int par) {
  bool leaf = true;
  leafs[pos] = 0;
  aux.push_back(pos);
  for (int i = L[pos].size() - 1, to; i >= 0; --i) {
    to = L[pos][i];
    if (to != par) {
      leaf = false;
      dfs(to, pos);
      leafs[pos] += leafs[to];
    }
  }
  if (leaf) {
    path[pos] = aux;
    leafs[pos] = 1;
  }
  aux.pop_back();
}
int a[300];
bool check(int l, int r, int lvl) {
  if (l == r) return true;
  bool ok = true;
  for (int i = l; i <= r && ok;) {
    int e = i, x = path[a[i]][lvl];
    while (e <= r && path[a[e]][lvl] == x) ++e;
    if (leafs[x] != e - i)
      return false;
    else
      ok = ok && check(i, e - 1, lvl + 1);
    i = e;
  }
  return ok;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1, u, v; i < n; ++i) {
    cin >> u >> v;
    L[u].push_back(v);
    L[v].push_back(u);
  }
  dfs(1, 0);
  string line;
  getline(cin, line);
  getline(cin, line);
  istringstream is(line);
  int m = 0;
  while (is >> a[m]) ++m;
  if (!check(0, m - 1, 0))
    cout << -1 << '\n';
  else {
    int sz[m];
    for (int i = 0; i < m; ++i) sz[i] = path[a[i]].size();
    for (int i = 0; i < sz[0]; ++i) cout << path[a[0]][i] << ' ';
    for (int i = 1; i < m; ++i) {
      int cont = 0;
      for (int j = 0; j < sz[i - 1] && j < sz[i]; ++j) {
        if (path[a[i - 1]][j] != path[a[i]][j]) break;
        ++cont;
      }
      for (int j = sz[i - 1] - 2; j >= cont - 1; --j)
        cout << path[a[i - 1]][j] << ' ';
      for (int j = cont; j < sz[i]; ++j) cout << path[a[i]][j] << ' ';
    }
    for (int i = sz[m - 1] - 2; i >= 0; --i) cout << path[a[m - 1]][i] << ' ';
    cout << '\n';
  }
  return 0;
}
