#include <bits/stdc++.h>
using namespace std;
vector<int> e[305], ans;
int used[305][305];
int n, m;
bool dfs(int x, int y, int last) {
  if (x == y) return true;
  for (int(i) = 0; (i) < (int)(e[x].size()); i++) {
    if (e[x][i] == last) continue;
    if (dfs(e[x][i], y, x)) {
      ans.push_back(x);
      return true;
    }
  }
  return false;
}
int main() {
  int x, y;
  cin >> n;
  m = n - 1;
  while (m--) {
    cin >> x >> y;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  y = 1;
  ans.push_back(1);
  while (cin >> x) {
    dfs(x, y, 0);
    y = x;
  }
  dfs(1, y, 0);
  if (ans.size() == 2 * n - 1) {
    for (int(i) = 0; (i) < (int)(ans.size()); i++) cout << ans[i] << ' ';
    cout << endl;
  } else
    puts("-1");
  return 0;
}
