#include <bits/stdc++.h>
using namespace std;
const int inf = ~0U >> 1;
const int maxn = 305;
vector<int> G[maxn];
bool vis[maxn][maxn], flag = false;
int d[maxn], l[maxn * 3], n, a, b, p = 0, f, nn = -1;
void dfs(int v, int c, int level) {
  if (flag) return;
  int to;
  vis[c][v] = 1;
  if (c == p && v == d[c]) {
    flag = true;
    nn = level;
    return;
  }
  l[level] = v;
  for (int i = 0; i < G[v].size(); i++) {
    to = G[v][i];
    if (vis[c][to]) continue;
    if (to == d[c]) dfs(to, c + 1, level + 1);
    dfs(to, c, level + 1);
  }
  vis[c][v] = 0;
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> a >> b;
    G[a].push_back(b), G[b].push_back(a);
  }
  while (cin >> f) d[p++] = f;
  d[p] = 1;
  dfs(1, 0, 1);
  if (nn != 2 * n - 1)
    printf("-1\n");
  else {
    for (int i = 1; i <= nn; i++) printf("%d ", l[i]);
  }
  return 0;
}
