#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> v[350];
vector<int> ans;
int xx, ant_ind = 1;
bool DFS(int ant_now, int ant_abi, int orig = -1) {
  if (ant_now == ant_abi) return true;
  for (int i = 0; i < v[ant_abi].size(); i++) {
    if (orig == v[ant_abi][i]) continue;
    if (DFS(ant_now, v[ant_abi][i], ant_abi)) {
      ans.push_back(ant_abi);
      return true;
    }
  }
  return false;
}
void print(vector<int> ANS) {
  if (ANS.size() != (2 * n - 1)) {
    puts("-1");
    return;
  }
  for (int i = 0; i < ANS.size(); i++) cout << ANS[i] << ' ';
  puts("");
  return;
}
int main() {
  ans.push_back(1);
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  while (scanf("%d", &xx) != EOF) {
    if (DFS(ant_ind, xx))
      ;
    ant_ind = xx;
  }
  if (DFS(ant_ind, 1))
    ;
  print(ans);
  return 0;
}
