#include <bits/stdc++.h>
using namespace std;
inline long long input() {
  long long n;
  cin >> n;
  return n;
}
long long pw(long long a, long long b) {
  return (!b ? 1 : (b & 1 ? a * pw(a * a, b / 2) : pw(a * a, b / 2)));
}
const int mod = 1e9 + 7;
int check[310][310];
queue<int> nobat;
int n;
int dist[310];
int now = -1;
vector<int> adj[310];
void BFS(int r) {
  for (int i = 0; i < 310; i++) dist[i] = mod;
  dist[r] = 0;
  nobat.push(r);
  while (!nobat.empty()) {
    int k = nobat.front();
    nobat.pop();
    for (auto u : adj[k]) {
      if (dist[u] > dist[k] + 1) {
        dist[u] = dist[k] + 1;
        nobat.push(u);
      }
    }
  }
}
vector<int> saf;
int go[310][310];
bool worked[310];
void DFS(int r, int l) {
  check[now][r] = 1;
  if (!worked[now]) saf.push_back(r);
  if (r == l)
    worked[now] = 1;
  else {
    for (auto u : adj[r]) {
      if (!check[now][u]) {
        DFS(u, l);
      }
    }
    if (!worked[now]) saf.pop_back();
  }
}
int maxy[310];
vector<int> ans;
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int v1, v2;
    cin >> v1 >> v2;
    adj[v1].push_back(v2);
    adj[v2].push_back(v1);
  }
  int l = 0;
  for (int i = 1; i <= n; i++)
    if (adj[i].size() == 1) l++;
  if (adj[1].size() == 1) l--;
  int leaf[l];
  for (int i = 0; i < l; i++) cin >> leaf[i];
  now++;
  DFS(1, leaf[0]);
  for (int j = 0; j < saf.size(); j++) {
    ans.push_back(saf[j]);
  }
  for (int j = 0; j < saf.size() - 1; j++) {
    go[saf[j]][saf[j + 1]]++;
    go[saf[j + 1]][saf[j]]++;
    if (go[saf[j]][saf[j + 1]] > 2) {
      cout << -1;
      return 0;
    }
  }
  saf.clear();
  for (int i = 1; i < l; i++) {
    now++;
    DFS(leaf[i - 1], leaf[i]);
    for (int j = 1; j < saf.size(); j++) {
      ans.push_back(saf[j]);
    }
    for (int j = 0; j < saf.size() - 1; j++) {
      go[saf[j]][saf[j + 1]]++;
      go[saf[j + 1]][saf[j]]++;
      if (go[saf[j]][saf[j + 1]] > 2) {
        cout << -1;
        return 0;
      }
    }
    saf.clear();
  }
  now++;
  DFS(leaf[l - 1], 1);
  for (int j = 1; j < saf.size(); j++) {
    ans.push_back(saf[j]);
  }
  for (int j = 0; j < saf.size() - 1; j++) {
    go[saf[j]][saf[j + 1]]++;
    go[saf[j + 1]][saf[j]]++;
    if (go[saf[j]][saf[j + 1]] > 2) {
      cout << -1;
      return 0;
    }
  }
  saf.clear();
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
