#include <bits/stdc++.h>
using namespace std;
long long n, b[100005], c[100005], id[200005], cnt = 0, du[100005], a[100005],
                                               cntt = 0;
multiset<long long> e[200005];
void dfs(long long u) {
  if (du[u] == 0) {
    a[++cntt] = u;
    return;
  }
  for (multiset<long long>::iterator it = e[u].begin(); it != e[u].end();
       it = e[u].begin()) {
    long long v = *it;
    e[u].erase(it);
    e[v].erase(e[v].find(u));
    du[u]--;
    du[v]--;
    dfs(v);
  }
  a[++cntt] = u;
}
signed main() {
  scanf("%lld", &n);
  for (long long i = 1; i < n; i++) {
    scanf("%lld", &b[i]);
    id[++cnt] = b[i];
  }
  for (long long i = 1; i < n; i++) {
    scanf("%lld", &c[i]);
    id[++cnt] = c[i];
  }
  for (long long i = 1; i < n; i++) {
    if (b[i] > c[i]) return puts("-1") * 0;
  }
  sort(id + 1, id + cnt + 1);
  cnt = unique(id + 1, id + cnt + 1) - id - 1;
  for (long long i = 1; i < n; i++) {
    long long u = lower_bound(id + 1, id + cnt + 1, b[i]) - id;
    long long v = lower_bound(id + 1, id + cnt + 1, c[i]) - id;
    e[u].insert(v);
    e[v].insert(u);
    du[u]++;
    du[v]++;
  }
  long long tot = 0, flag = 0, odd;
  for (long long i = 1; i <= n; i++) {
    if (du[i] & 1) tot++, odd = i;
    if (tot > 2) {
      flag = 1;
      break;
    }
  }
  if (flag || tot == 1) return puts("-1") * 0;
  if (!tot)
    dfs(1);
  else
    dfs(odd);
  if (cntt != n) return puts("-1") * 0;
  for (long long i = 1; i <= cntt; i++) {
    printf("%lld ", id[a[i]]);
  }
  puts("");
  return 0;
}
