#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int n, k = 0, passn[310][310];
vector<int> g[310], ord, want;
bool vis[310];
void dfs(int pos, int to, vector<int> pass) {
  vis[pos] = true;
  pass.push_back(pos);
  if (pos == to) {
    want = pass;
    return;
  }
  for (int i = 0; i < g[pos].size(); i++) {
    int t = g[pos][i];
    if (vis[t]) continue;
    dfs(t, to, pass);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  int x;
  while (cin >> x) ord.push_back(x);
  int now = 1;
  ord.push_back(1);
  vector<int> ans;
  for (int i = 0; i < ord.size(); i++) {
    memset(vis, 0, sizeof(vis));
    vector<int> tmp;
    want.clear();
    dfs(now, ord[i], tmp);
    if (want.size() == 1) {
      printf("-1\n");
      return 0;
    }
    if (i == 0) ans.push_back(want[0]);
    for (int j = 1; j < want.size(); j++) ans.push_back(want[j]);
    now = ord[i];
  }
  for (int i = 0; i < ans.size() - 1; i++) {
    int from = ans[i], to = ans[i + 1];
    passn[from][to]++;
    passn[to][from]++;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      if (passn[i][j] > 2) {
        printf("-1\n");
        return 0;
      }
    }
  }
  for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
