#include <bits/stdc++.h>
using namespace std;
long long n, b[100005], c[100005];
map<long long, multiset<long long> > edge;
map<long long, multiset<long long> >::iterator it;
vector<long long> ans;
map<long long, long long> vis;
long long tot;
void hierholzer(int cur) {
  while (edge[cur].size()) {
    long long i = *(edge[cur].begin());
    edge[cur].erase(edge[cur].begin());
    edge[i].erase(edge[i].find(cur));
    hierholzer(i);
  }
  ans.push_back(cur);
}
void dfs(int cur) {
  if (vis[cur] == 0) {
    vis[cur] = 1;
    tot++;
  }
  for (auto i : edge[cur]) {
    if (vis[i] == 0) {
      dfs(i);
    }
  }
}
int main() {
  scanf("%lld", &n);
  for (int i = 1; i < n; i++) scanf("%lld", &b[i]);
  for (int i = 1; i < n; i++) scanf("%lld", &c[i]);
  for (int i = 1; i < n; i++) {
    if (b[i] > c[i]) {
      puts("-1");
      return 0;
    }
    edge[b[i]].insert(c[i]);
    edge[c[i]].insert(b[i]);
  }
  long long sta = (edge.begin())->first, odd = 0;
  dfs(sta);
  if (tot != edge.size()) {
    puts("-1");
    return 0;
  }
  for (it = edge.begin(); it != edge.end(); it++) {
    if ((it->second.size()) % 2) {
      odd++;
      sta = it->first;
    }
  }
  if (odd == 0 || odd == 2) {
    hierholzer(sta);
    for (auto i : ans) {
      printf("%lld ", i);
    }
  } else {
    puts("-1");
  }
  return 0;
}
