#include <bits/stdc++.h>
using namespace std;
map<long long, int> remap;
int cntr;
vector<long long> unremap;
void error(const char *s) {
  cerr << s << endl;
  exit(0);
}
int getnum(long long v) {
  if (remap.find(v) == remap.end()) {
    remap[v] = cntr++;
    unremap.push_back(v);
  }
  return remap[v];
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  vector<long long> b(n);
  for (int i = 0; i + 1 < n; i++) cin >> a[i];
  for (int i = 0; i + 1 < n; i++) cin >> b[i];
  for (int i = 0; i + 1 < n; i++)
    if (a[i] > b[i]) {
      cout << -1 << endl;
      exit(0);
    }
  for (int i = 0; i + 1 < n; i++) {
    a[i] = getnum(a[i]);
    b[i] = getnum(b[i]);
  }
  vector<vector<int> > neigh(cntr);
  vector<int> cnts(cntr);
  for (int i = 0; i + 1 < n; i++) {
    neigh[a[i]].push_back(i);
    neigh[b[i]].push_back(i);
    cnts[a[i]]++;
    cnts[b[i]]++;
  }
  int odds = 0;
  int lastodd = 0;
  int oddsum = 0;
  vector<char> used(n);
  for (int i = 0; i < cnts.size(); i++) {
    if (neigh[i].size() & 1) {
      odds++;
      oddsum += i;
      lastodd = i;
    }
  }
  if (odds != 0 && odds != 2) {
    cout << -1 << endl;
    exit(0);
  }
  vector<int> path;
  vector<int> st;
  int cv = lastodd;
  while (st.size() > 0 || cnts[cv]) {
    if (cnts[cv] == 0) {
      path.push_back(cv);
      cv = st[st.size() - 1];
      st.pop_back();
    } else {
      int e = -1;
      while (neigh[cv].size()) {
        e = neigh[cv][neigh[cv].size() - 1];
        neigh[cv].pop_back();
        if (!used[e]) break;
      }
      if (e < 0) error("! did not find edge");
      used[e] = 1;
      int nxt = a[e] + b[e] - cv;
      st.push_back(cv);
      cnts[cv]--;
      cnts[nxt]--;
      cv = nxt;
    }
  }
  path.push_back(lastodd);
  if (path.size() != n) {
    cout << -1 << endl;
    exit(0);
  }
  for (int i = 0; i < path.size(); i++) {
    if (i) cout << " ";
    cout << unremap[path[i]];
  }
  cout << endl;
}
