#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[1005];
vector<int> G[1005];
vector<int> st;
vector<int> ans;
int edge[305][305];
bool ok = 0;
void dfs(int u, int par, int to) {
  if (ok) return;
  st.push_back(u);
  if (u == to) {
    ok = 1;
    return;
  }
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (v != par) dfs(v, u, to);
  }
  if (ok) return;
  st.pop_back();
}
int main() {
  scanf("%d", &n);
  int x, y;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
  k = 0;
  for (int i = 2; i <= n; i++) {
    if (G[i].size() == 1) k++;
  }
  int prev = 1;
  for (int i = 0; i <= k; i++) {
    if (i == k)
      a[i] = 1;
    else
      scanf("%d", &a[i]);
    ok = 0;
    dfs(prev, -1, a[i]);
    int from = (i) ? 1 : 0;
    for (; from < st.size(); from++) {
      int who = st[from];
      ans.push_back(st[from]);
      if (from) {
        edge[who][st[from - 1]]++;
        edge[st[from - 1]][who]++;
      }
    }
    prev = a[i];
    st.clear();
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (edge[i][j] && edge[i][j] != 2) {
        printf("-1\n");
        return 0;
      }
    }
  }
  for (int i = 0; i < (int)ans.size(); i++) {
    if (i) printf(" ");
    printf("%d", ans[i]);
  }
  return 0;
}
