#include <bits/stdc++.h>
using namespace std;
int n;
int e[305][305];
vector<int> ans;
void solve(int stpos, int edpos) {
  while (stpos != edpos) {
    int i;
    for (i = 1; i <= n; i++)
      if (e[i][stpos] == 1 && e[edpos][i] < e[edpos][stpos]) break;
    ans.push_back(i);
    if ((int)ans.size() >= 2 * n) {
      printf("-1\n");
      exit(0);
    }
    stpos = i;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j)
        e[i][j] = 0;
      else
        e[i][j] = (1e9);
    }
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    e[a][b] = e[b][a] = 1;
  }
  for (int k = 1; k <= n; k++)
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++)
        if (e[i][j] > e[i][k] + e[k][j]) e[i][j] = e[i][k] + e[k][j];
  int nowpos, lastpos = 1;
  ans.push_back(1);
  while (scanf("%d", &nowpos) != EOF) {
    solve(lastpos, nowpos);
    lastpos = nowpos;
  }
  solve(lastpos, 1);
  if ((int)ans.size() != 2 * n - 1) {
    printf("-1\n");
    return 0;
  }
  for (unsigned int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
