#include <bits/stdc++.h>
using namespace std;
const long long maxN = 5e5 + 5, maxW = 3005, mod = 1e9 + 7,
                inf = LLONG_MAX / 1000ll;
long long N, a[maxN], b[maxN];
long long trv[maxN];
vector<long long> cpr;
struct edge {
  long long f, t;
  bool used;
  edge(long long f, long long t) : f(f), t(t), used(0) {}
};
vector<edge> E;
deque<long long> dq;
vector<long long> g[maxN];
long long ptr[maxN];
void euler(long long u) {
  for (long long &p = ptr[u]; p < g[u].size(); ++p) {
    long long id = g[u][p];
    long long v = E[id].t;
    if (E[id].used) continue;
    E[id].used = 1;
    E[id ^ 1].used = 1;
    euler(v);
  }
  dq.push_back(u);
}
void add(long long u, long long v) {
  g[u].push_back(E.size());
  E.push_back(edge(u, v));
  g[v].push_back(E.size());
  E.push_back(edge(v, u));
}
void print() {
  while (!dq.empty()) {
    cout << trv[dq.front()] << ' ';
    dq.pop_front();
  }
  exit(0);
}
void checkeuler() {
  for (long long i = (long long)0; i <= (long long)cpr.size(); i++) {
    for (long long id : g[i]) {
      if (!E[id].used) {
        cout << -1;
        exit(0);
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  for (long long i = (long long)1; i <= (long long)N - 1; i++) cin >> a[i];
  for (long long i = (long long)1; i <= (long long)N - 1; i++) cin >> b[i];
  for (long long i = (long long)1; i <= (long long)N - 1; i++) {
    if (a[i] > b[i]) return cout << -1, 0;
    cpr.push_back(a[i]);
    cpr.push_back(b[i]);
  }
  sort(begin(cpr), end(cpr));
  for (long long i = (long long)1; i <= (long long)N - 1; i++) {
    a[i] = lower_bound(begin(cpr), end(cpr), a[i]) - begin(cpr) + 1;
    b[i] = lower_bound(begin(cpr), end(cpr), b[i]) - begin(cpr) + 1;
    add(a[i], b[i]);
  }
  for (long long i = (long long)1; i <= (long long)cpr.size(); i++) {
    trv[i] = cpr[i - 1];
  }
  vector<long long> odd;
  for (long long i = (long long)1; i <= (long long)cpr.size(); i++) {
    if (g[i].size() & 1) odd.push_back(i);
  }
  if (odd.size() == 2) {
    add(odd[0], odd[1]);
    euler(odd[0]);
    checkeuler();
    dq.pop_back();
    while (1) {
      if (dq.front() == odd[0] and dq.back() == odd[1])
        print();
      else if (dq.front() == odd[1] and dq.back() == odd[0])
        print();
      else {
        long long t = dq.front();
        dq.pop_front();
        dq.push_back(t);
      }
    }
  } else if (odd.empty()) {
    euler(1);
    checkeuler();
    print();
  } else
    cout << -1;
}
