#include <bits/stdc++.h>
using namespace std;
vector<int> bt;
int par[305];
queue<int> pos;
stack<int> sta;
int cnt[305][305];
bool valid;
vector<int> hasil, adj[305];
void bfs(int S, int T) {
  memset(par, -1, sizeof(par));
  while (!pos.empty()) pos.pop();
  pos.push(S);
  par[S] = 0;
  while (!pos.empty()) {
    int u = pos.front();
    pos.pop();
    if (u == T) break;
    for (int z = 0; z < adj[u].size(); z++) {
      int v = adj[u][z];
      if (par[v] == -1) {
        par[v] = u;
        pos.push(v);
      }
    }
  }
  while (T != 0) {
    sta.push(T);
    T = par[T];
  }
  int now = sta.top();
  sta.pop();
  while (!sta.empty()) {
    hasil.push_back(now);
    cnt[now][sta.top()]++;
    cnt[sta.top()][now]++;
    if (cnt[now][sta.top()] > 2) valid = 0;
    now = sta.top();
    sta.pop();
  }
}
int main() {
  valid = 1;
  int n;
  scanf("%d", &n);
  for (int a = 1; a < n; a++) {
    int l, r;
    scanf("%d%d", &l, &r);
    adj[l].push_back(r);
    adj[r].push_back(l);
  }
  vector<int> lis;
  lis.push_back(1);
  string S;
  getline(cin, S);
  getline(cin, S);
  S.push_back(' ');
  int tmp = 0;
  for (int a = 0; a < S.size(); a++) {
    if (isdigit(S[a])) {
      tmp *= 10;
      tmp += (S[a] - '0');
    } else {
      lis.push_back(tmp);
      tmp = 0;
    }
  }
  lis.push_back(1);
  for (int z = 1; z < lis.size(); z++) {
    bfs(lis[z - 1], lis[z]);
  }
  hasil.push_back(1);
  if (!valid) {
    printf("-1\n");
    return 0;
  }
  for (int z = 0; z < hasil.size(); z++) {
    if (z > 0) printf(" ");
    printf("%d", hasil[z]);
  }
  return 0;
}
