#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 10, modP = 1e9 + 7;
unordered_map<int, unordered_map<int, int> > adj;
int n, start, b[maxN], c[maxN];
vector<int> circuit;
map<int, int> d;
void euler(int start) {
  stack<int> st;
  st.push(start);
  while (!st.empty()) {
    int u = st.top();
    if (adj[u].empty())
      circuit.push_back(u), st.pop();
    else {
      auto v = adj[u].begin()->first;
      --adj[u][v];
      --adj[v][u];
      if (adj[u][v] == 0) {
        adj[u].erase(v);
        adj[v].erase(u);
      }
      st.push(v);
    }
  }
}
void no_solution() {
  cout << -1 << endl;
  exit(0);
}
void add_edge(int u, int v) {
  ++adj[u][v];
  ++adj[v][u];
}
int main() {
  cin >> n;
  for (int i = 1; i <= n - 1; ++i) scanf("%d", &b[i]);
  for (int i = 1; i <= n - 1; ++i) {
    scanf("%d", &c[i]);
    if (c[i] < b[i]) no_solution();
    add_edge(c[i], b[i]);
    ++d[c[i]];
    ++d[b[i]];
  }
  int num_odd = 0;
  start = b[1];
  for (auto p : d)
    if (p.second % 2) start = p.first, ++num_odd;
  if (num_odd > 2) no_solution();
  euler(start);
  if (circuit.size() != n) no_solution();
  for (int v : circuit) printf("%d ", v);
}
