#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> MAP[500];
int p[500][10];
int d[500];
int l[500];
void dfs(int u, int fa) {
  d[u] = d[fa] + 1;
  p[u][0] = fa;
  for (int k = 1; k < 10; k++) p[u][k] = p[p[u][k - 1]][k - 1];
  int sz = MAP[u].size();
  for (int i = 0; i < sz; i++) {
    int v = MAP[u][i];
    if (!d[v]) dfs(v, u);
  }
}
int LCA(int u, int v) {
  if (d[u] > d[v]) swap(u, v);
  if (d[v] > d[u]) {
    int dis = d[v] - d[u];
    for (int i = 0; i < 10; i++)
      if (dis & (1 << i)) v = p[v][i];
  }
  if (u != v) {
    for (int i = 10 - 1; i >= 0; i--)
      if (p[u][i] != p[v][i]) {
        u = p[u][i];
        v = p[v][i];
      }
    u = p[u][0];
    v = p[v][0];
  }
  return u;
}
void handle() {
  int cnt = 1;
  while (scanf("%d", &l[cnt]) != EOF) cnt++;
  l[0] = 1;
  l[cnt] = 1;
  int dis = 0;
  queue<int> ans;
  for (int i = 1; i <= cnt; i++) {
    int zuxian = LCA(l[i - 1], l[i]);
    dis += d[l[i - 1]] + d[l[i]] - 2 * d[zuxian];
    int temp = l[i - 1];
    while (d[zuxian] - d[temp]) {
      ans.push(temp);
      temp = p[temp][0];
    }
    ans.push(zuxian);
    stack<int> s;
    temp = l[i];
    while (d[zuxian] - d[temp]) {
      s.push(temp);
      temp = p[temp][0];
    }
    while (s.size() > 1) {
      ans.push(s.top());
      s.pop();
    }
  }
  if (dis == 2 * (n - 1)) {
    while (!ans.empty()) {
      printf("%d ", ans.front());
      ans.pop();
    }
    puts("");
  } else
    printf("-1\n");
}
int main() {
  scanf("%d", &n);
  int a, b;
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &a, &b);
    MAP[a].push_back(b);
    MAP[b].push_back(a);
  }
  dfs(1, 0);
  handle();
  return 0;
}
