#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> adj[301];
bool vis[301];
vector<int> path[301][301];
vector<int> curr_path;
vector<int> ans;
void dfs(int root, int u) {
  curr_path.push_back(u);
  for (int i = 0; i < curr_path.size(); i++)
    path[root][u].push_back(curr_path[i]);
  vis[u] = true;
  for (int j = 0; j < adj[u].size(); j++) {
    int v = adj[u][j];
    if (!vis[v]) dfs(root, v);
  }
  curr_path.pop_back();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  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);
  }
  for (int i = 1; i <= n; i++) {
    memset(vis, false, sizeof vis);
    dfs(i, i);
  }
  int u = 1;
  ans.push_back(1);
  int v;
  while (cin >> v) {
    for (int i = 1; i < path[u][v].size(); i++) ans.push_back(path[u][v][i]);
    u = v;
  }
  for (int i = 1; i < path[u][1].size(); i++) ans.push_back(path[u][1][i]);
  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;
}
