human
Connected undirected graph without cycles is called a tree. Trees is a class of graphs which is interesting not only for people, but for ants too.

An ant stands at the root of some tree. He sees that there are n vertexes in the tree, and they are connected by n - 1 edges so that there is a path between any pair of vertexes. A leaf is a distinct from root vertex, which is connected with exactly one other vertex.

The ant wants to visit every vertex in the tree and return to the root, passing every edge twice. In addition, he wants to visit the leaves in a specific order. You are to find some possible route of the ant.

Input

The first line contains integer n (3 ≤ n ≤ 300) — amount of vertexes in the tree. Next n - 1 lines describe edges. Each edge is described with two integers — indexes of vertexes which it connects. Each edge can be passed in any direction. Vertexes are numbered starting from 1. The root of the tree has number 1. The last line contains k integers, where k is amount of leaves in the tree. These numbers describe the order in which the leaves should be visited. It is guaranteed that each leaf appears in this order exactly once.

Output

If the required route doesn't exist, output -1. Otherwise, output 2n - 1 numbers, describing the route. Every time the ant comes to a vertex, output it's index.

Examples

Input

3
1 2
2 3
3

Output

1 2 3 2 1 

Input

6
1 2
1 3
2 4
4 5
4 6
5 6 3

Output

1 2 4 5 4 6 4 2 1 3 1 

Input

6
1 2
1 3
2 4
4 5
4 6
5 3 6

Output

-1
The above is tricky. Write me a correct solution in CPP.

=====
Can you provide a Python program to find some possible route of the ant?
assistant
#Here is Python program to find some possible route of the ant.

#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
vector<int> gr[N], temp, ar, ans;
int n, u, v, io[N], hash[N], cnt[N], k;
bool flag;
void pb(vector<int>* fi, vector<int> se) {
  for (int i = 0; i < se.size(); i++) (*fi).push_back(se[i]);
}
bool dfs(int node, int come, int tar) {
  if (node == tar) {
    flag = true;
    return true;
  }
  for (int i = 0; i < gr[node].size(); i++) {
    if (flag == true) break;
    if (gr[node][i] != come) {
      bool def = dfs(gr[node][i], node, tar);
      if (def) {
        temp.push_back(gr[node][i]);
        break;
      }
    }
  }
  return flag;
}
void alloc() {
  dfs(ar.back(), -1, 1);
  reverse(temp.begin(), temp.end());
  pb(&ans, temp);
  flag = false;
  temp.clear();
  dfs(1, -1, ar[0]);
  temp.push_back(1);
  reverse(ans.begin(), ans.end());
  pb(&ans, temp);
  reverse(ans.begin(), ans.end());
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    gr[u].push_back(v);
    gr[v].push_back(u);
    io[v]++, io[u]++;
  }
  for (int i = 2; i <= n; i++)
    if (io[i] == 1) k++;
  for (int i = 1; i <= k; i++) {
    cin >> u;
    ar.push_back(u);
  }
  for (int i = 1; i < ar.size(); i++, flag = false, temp.clear()) {
    dfs(ar[i - 1], -1, ar[i]);
    reverse(temp.begin(), temp.end());
    for (int i = 0; i < temp.size(); i++) ans.push_back(temp[i]);
  }
  alloc();
  if (ans.size() != n * 2 - 1) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}