#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, a[maxn], b[maxn];
map<int, multiset<int>> adj;
vector<int> eulerPath, odd;
void dfs(int u) {
  while (adj[u].size()) {
    int v = *adj[u].begin();
    adj[u].erase(adj[u].begin());
    adj[v].erase(adj[v].find(u));
    dfs(v);
  }
  eulerPath.emplace_back(u);
}
bool isEulerGraph() {
  for (auto i : adj) {
    if ((int)i.second.size() & 1) odd.emplace_back(i.first);
  }
  return ((!(int)odd.size()) || ((int)odd.size() == 2));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i < n; ++i) scanf("%d", &b[i]);
  for (int i = 1; i < n; ++i) {
    if (a[i] > b[i]) return puts("-1"), 0;
    adj[a[i]].insert(b[i]);
    adj[b[i]].insert(a[i]);
  }
  if (!isEulerGraph()) return puts("-1"), 0;
  dfs(odd.empty() ? adj.begin()->first : odd[0]);
  if ((int)eulerPath.size() != n) return puts("-1"), 0;
  for (auto i : eulerPath) printf("%d ", i);
  puts("");
  return 0;
}
