#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> vec[500], a;
bool dfs(int root, int u, int pre) {
  if (root == u) return 1;
  for (int i = 0; i < vec[u].size(); i++) {
    int v = vec[u][i];
    if (v == pre) continue;
    if (dfs(root, v, u)) {
      a.push_back(u);
      return 1;
    }
  }
  return 0;
}
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) vec[i].clear();
    for (int i = 0; i < n - 1; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      vec[u].push_back(v);
      vec[v].push_back(u);
    }
    a.clear();
    a.push_back(1);
    int root = 1;
    for (int i = 2; i <= n; i++) {
      if (vec[i].size() == 1) {
        int u;
        scanf("%d", &u);
        dfs(root, u, -1);
        root = u;
      }
    }
    dfs(root, 1, -1);
    if (a.size() != 2 * n - 1) {
      printf("-1\n");
    } else {
      for (int i = 0; i < a.size(); i++) {
        if (i == 0)
          printf("%d", a[i]);
        else
          printf(" %d", a[i]);
      }
      printf("\n");
    }
  }
  return 0;
}
