#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
const int maxn = 310;
vector<int> a[maxn];
int pp[maxn];
int val[maxn];
bool leaf[maxn];
int k = 0;
void dfs1(int v, int p) {
  int cc = 0;
  val[v] = 10000;
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (to == p) continue;
    ++cc;
    dfs1(to, v);
    val[v] = min(val[v], val[to]);
  }
  if (cc == 0) {
    leaf[v] = 1;
    ++k;
    for (int i = 0; i < k; ++i)
      if (pp[i] == v) {
        val[v] = i;
        break;
      }
  }
}
vector<int> order;
int pos = 0;
bool cmp(int i1, int i2) { return val[i1] < val[i2]; }
void dfs2(int v, int p) {
  order.push_back(v);
  sort(a[v].begin(), a[v].end(), cmp);
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (to == p) continue;
    dfs2(to, v);
    order.push_back(v);
  }
}
bool has[maxn] = {};
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; ++i) {
    int fr, to;
    scanf("%d%d", &fr, &to);
    --fr;
    --to;
    a[fr].push_back(to);
    a[to].push_back(fr);
  }
  while (scanf("%d", &pp[k]) == 1) --pp[k++];
  dfs1(0, -1);
  dfs2(0, -1);
  for (int i = 0; i < int((order).size()); ++i) {
    int cur = order[i];
    if (leaf[cur]) {
      if (!has[cur]) {
        if (pp[pos] != cur) {
          printf("-1\n");
          exit(0);
        } else
          pos++, has[cur] = 1;
      }
    }
  }
  for (int i = 0; i < int((order).size()); ++i) printf("%d ", order[i] + 1);
  return 0;
}
