#include <bits/stdc++.h>
using namespace std;
vector<int> g[1005];
int mp[1005], l[1005], cntl, n, mi[1005], ans[1000005], cntans;
bool cmp(int l1, int l2) { return mp[mi[l1]] < mp[mi[l2]]; }
void init(int u, int last) {
  for (int i = 0; i < int(g[u].size()); i++) {
    int v = g[u][i];
    if (v == last) continue;
    init(v, u);
    if (cmp(v, u)) mi[u] = mi[v];
  }
  sort(g[u].begin(), g[u].end(), cmp);
}
void dfs(int u, int last) {
  ans[++cntans] = u;
  for (int i = 0; i < int(g[u].size()); i++) {
    int v = g[u][i];
    if (v == last) continue;
    dfs(v, u);
    ans[++cntans] = u;
  }
  if (g[u].size() == 1)
    if (u != 1) {
      cntl++;
      if (l[cntl] != u) printf("-1"), exit(0);
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  mp[0] = 1000000000;
  while (~scanf("%d", l + (++cntl))) {
    mp[l[cntl]] = cntl;
    mi[l[cntl]] = l[cntl];
  }
  cntl--;
  init(1, -1);
  cntl = 0;
  dfs(1, -1);
  for (int i = 1; i <= cntans; i++) printf("%d ", ans[i]);
  return 0;
}
