#include <bits/stdc++.h>
using namespace std;
int conversion(string p) {
  int o;
  o = atoi(p.c_str());
  return o;
}
string toString(int h) {
  stringstream ss;
  ss << h;
  return ss.str();
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long lcm(long long a, long long b) { return (a * (b / gcd(a, b))); }
long long toi(string p) {
  long long x;
  istringstream in(p);
  in >> x;
  return x;
}
int v[301][301];
vector<vector<int> > M;
vector<int> L, K, P;
string go(int x, int y) {
  bool visitado[301][301];
  memset(visitado, false, sizeof visitado);
  queue<pair<int, string> > Q;
  Q.push(make_pair(x, ""));
  while (!Q.empty()) {
    pair<int, string> p = Q.front();
    Q.pop();
    int u = p.first;
    string c = p.second;
    if (u == y) {
      return c;
    }
    for (int i = 0; i < M[u].size(); i++) {
      if (!visitado[u][M[u][i]]) {
        Q.push(make_pair(M[u][i],
                         c + toString(u) + " " + toString(M[u][i]) + " "));
        visitado[u][M[u][i]] = true;
      }
    }
  }
  return "";
}
bool vamos(string x) {
  int a, b;
  istringstream in(x);
  while (in >> a) {
    in >> b;
    L.push_back(a);
    K.push_back(a);
  }
  for (int i = 0; i < L.size() - 1; i++) {
    v[L[i]][L[i + 1]]++;
    v[L[i + 1]][L[i]]++;
    if (v[L[i]][L[i + 1]] > 2 || v[L[i + 1]][L[i]] > 2) {
      cout << -1 << endl;
      return false;
    }
  }
  L.clear();
  return true;
}
int main() {
  int n, x, y, ind = 0;
  cin >> n;
  string res = "", p, a;
  memset(v, 0, sizeof v);
  M.assign(n + 1, vector<int>());
  for (int i = 0; i < n - 1; i++) {
    cin >> x >> y;
    M[x].push_back(y);
    M[y].push_back(x);
  }
  getline(cin, a);
  getline(cin, a);
  istringstream in(a);
  while (in >> x) {
    P.push_back(x);
    if (ind == 0) {
      p = go(1, x);
      if (!vamos(p)) return 0;
      ind++;
    } else {
      p = go(P[ind - 1], x);
      if (!vamos(p)) return 0;
      ind++;
    }
  }
  p = go(P[P.size() - 1], 1);
  if (!vamos(p)) return 0;
  K.push_back(1);
  for (int i = 0; i < K.size(); i++) cout << K[i] << " ";
}
