#include <bits/stdc++.h>
using namespace std;
int n, parent[610], kparent[610][15], depth[610], seen[610], dist[610];
vector<int> ady[610];
void dfs(int first, int lvl) {
  seen[first] = 1;
  depth[first] = lvl;
  for (int i = 0; i < ady[first].size(); ++i) {
    if (!seen[ady[first][i]]) {
      parent[ady[first][i]] = first;
      dfs(ady[first][i], lvl + 1);
    }
  }
}
void lca_init() {
  int i, j;
  memset(kparent, -1, sizeof(kparent));
  for (i = 0; i < n; ++i) kparent[i][0] = parent[i];
  for (j = 1; 1 << j <= n; ++j)
    for (i = 0; i < n; ++i) kparent[i][j] = kparent[kparent[i][j - 1]][j - 1];
}
int LCA(int p, int q) {
  int i, j;
  if (depth[p] < depth[q]) swap(p, q);
  for (j = 1; 1 << j <= depth[p]; ++j)
    ;
  --j;
  for (i = j; i >= 0; --i)
    if (depth[p] - (1 << i) >= depth[q]) p = kparent[p][i];
  if (p == q) return q;
  for (i = j; i >= 0; --i)
    if (kparent[p][i] != -1 && kparent[p][i] != kparent[q][i])
      p = kparent[p][i], q = kparent[q][i];
  return parent[p];
}
char s[610 * 3];
int id[610][610];
int resp[610 * 10], len;
bool up(int first, int lca) {
  while (first != lca) {
    resp[len++] = first;
    if (id[first][parent[first]] > 0) {
      id[first][parent[first]]--;
    } else
      return false;
    first = parent[first];
  }
  resp[len++] = lca;
  return true;
}
bool down(int lca, int first) {
  vector<int> aux;
  while (first != lca) {
    aux.push_back(first);
    if (id[first][parent[first]] > 0) {
      id[first][parent[first]]--;
    } else
      return false;
    first = parent[first];
  }
  for (int i = aux.size() - 1; i >= 0; --i) {
    resp[len++] = aux[i];
  }
  return true;
}
int main() {
  scanf("%d", &n);
  int i, u, v, lca;
  memset(id, 0, sizeof(id));
  for (i = 0; i < n - 1 && scanf("%d %d", &u, &v); ++i) {
    u--;
    v--;
    ady[u].push_back(v);
    ady[v].push_back(u);
    id[u][v] = id[v][u] = 2;
  }
  memset(seen, 0, sizeof(seen));
  memset(dist, 0, sizeof(dist));
  dfs(0, 0);
  lca_init();
  gets(s);
  gets(s);
  strcat(s, " 1 ");
  stringstream ss(s);
  u = 0;
  bool possible = true;
  len = 0;
  while (ss >> v) {
    v--;
    lca = LCA(u, v);
    if (up(u, lca)) {
      if (!down(lca, v)) {
        possible = false;
        break;
      }
    } else {
      possible = false;
      break;
    }
    u = v;
  }
  if (!possible)
    puts("-1");
  else {
    int ant = -1;
    for (i = 0; i < len; ++i) {
      if (resp[i] == ant) continue;
      printf("%d ", resp[i] + 1);
      ant = resp[i];
    }
    printf("\n");
  }
  return 0;
}
