#include <bits/stdc++.h>
using namespace std;
int const MN = 300 + 2;
int n;
vector<int> v[MN], vert;
map<pair<int, int>, int> m;
struct node {
  vector<int> v;
  int in, c;
  node(){};
  node(int in, int a) : in(in) { v.push_back(a); }
  ~node() { v.clear(); }
};
vector<int> ret;
bool bfs(int s, int e) {
  bool vis[MN] = {0};
  queue<node> q;
  q.push(node(s, 0));
  vector<int> ans;
  while (q.size()) {
    node cur = q.front();
    q.pop();
    int in = cur.in;
    vis[in] = 1;
    if (in == e) {
      ans = cur.v;
      ans.push_back(e);
      break;
    }
    for (int i = 0; i < v[in].size(); i++) {
      int k = v[in][i];
      if (!vis[k]) {
        node tp = cur;
        tp.in = k;
        tp.v.push_back(in);
        vis[k] = 1;
        q.push(tp);
      }
    }
  }
  for (int i = 1; i < ans.size() - 1; i++) {
    int a = ans[i];
    int b = ans[i + 1];
    pair<int, int> t = pair<int, int>(min(a, b), max(a, b));
    if (m[t] == 0) return 0;
    m[t]--;
    ret.push_back(ans[i]);
  }
  return 1;
}
int main() {
  int a, b;
  scanf("%d ", &n);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d %d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
    m[pair<int, int>(min(a, b), max(a, b))] = 2;
  }
  while (scanf("%d ", &a) != EOF) {
    vert.push_back(a);
  }
  int s = 1;
  int e;
  bool f = 1;
  for (int i = 0; i < vert.size(); i++) {
    if (!bfs(s, vert[i])) f = 0;
    s = vert[i];
  }
  if (!bfs(s, 1)) f = 0;
  if (!f)
    cout << -1 << endl;
  else {
    for (int i = 0; i < ret.size(); i++) cout << ret[i] << " ";
    cout << 1 << endl;
  }
}
