#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6;
const int inf = 1e9;
vector<int> g[305];
vector<int> ans;
bool dfs(int u, int v, int q) {
  if (u == v) {
    return 1;
  }
  for (auto it : g[v]) {
    if (it == q) {
      continue;
    }
    if (dfs(u, it, v)) {
      ans.push_back(v);
      return 1;
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, u, v;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int root = 1, x;
  ans.push_back(1);
  while (cin >> x) {
    dfs(root, x, -1);
    root = x;
  }
  dfs(root, 1, -1);
  if (ans.size() == (2 * n) - 1) {
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << " ";
    }
    cout << endl;
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
