#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long int INF = 1e12;
const int N = 3e2 + 1;
vector<int> adj[N];
vector<int> path;
bool dfs(int u, int v, int parent) {
  if (u == v) return 1;
  for (int vi : adj[u]) {
    if (vi == parent) continue;
    path.push_back(vi);
    if (dfs(vi, v, u)) return 1;
    path.pop_back();
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int u = 1, v;
  path.push_back(1);
  while (cin >> v) {
    dfs(u, v, 0);
    u = v;
  }
  dfs(u, 1, 0);
  if (path.size() == 2 * n - 1) {
    for (int v : path) cout << v << " ";
  } else
    cout << -1;
  return 0;
}
