#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9 + 10;
const int N = 3010;
int n, tot, fr, to, tmp;
int head[N], ans[N * 2];
struct Edge {
  int nxt, to;
} ed[N >> 1];
void add_edge(int x, int y) {
  ed[++tot].to = y;
  ed[tot].nxt = head[x];
  head[x] = tot;
}
bool dfs(int u, int e, int fa) {
  if (u == e) return 1;
  for (int i = head[u]; i != -1; i = ed[i].nxt) {
    int v = ed[i].to;
    if (v != fa && dfs(v, e, u)) {
      ans[++tmp] = u;
      return 1;
    }
  }
  return 0;
}
int main() {
  memset(head, -1, sizeof(head));
  scanf("%d", &n);
  ans[++tmp] = 1;
  ;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &fr, &to);
    add_edge(fr, to);
    add_edge(to, fr);
  }
  to = 1;
  while (~scanf("%d", &fr)) {
    dfs(fr, to, 0);
    to = fr;
  }
  dfs(1, to, 0);
  if (tmp > 2 * n - 1)
    puts("-1");
  else
    for (int i = 1; i <= tmp; i++) printf("%d ", ans[i]);
  return 0;
}
