#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
inline bool chkmax(T& a, U b) {
  return (a < b) ? (a = b, true) : false;
}
template <class T, class U>
inline bool chkmin(T& a, U b) {
  return (a > b) ? (a = b, true) : false;
}
template <class T>
inline vector<T> uniq(vector<T> vec) {
  sort((vec).begin(), (vec).end()),
      vec.erase(unique((vec).begin(), (vec).end()), end(vec));
  return vec;
}
void solve();
int main(int argc, char** argv) {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout.setf(ios_base::fixed), cout.precision(10);
  solve();
  double times = (clock() * 1.0 / CLOCKS_PER_SEC);
  do {
  } while (0);
}
template <int NV>
class undirectedEulerPath {
 public:
  vector<int> path;
  multiset<int> G[NV];
  void addedge(int u, int v) { G[u].insert(v), G[v].insert(u); }
  void dfs(int cur) {
    while (!G[cur].empty()) {
      int tar = *G[cur].begin();
      G[cur].erase(G[cur].begin());
      G[tar].erase(G[tar].find(cur));
      dfs(tar);
    }
    path.push_back(cur);
  }
  bool get() {
    int src = -1, odd = 0, tot = 0;
    for (int i = 0; i < NV; i++) {
      tot += G[i].size();
      if (G[i].size() % 2 == 1) {
        odd++, src = (~src) ? src : i;
      }
    }
    if (odd != 0 && odd != 2) return false;
    dfs(odd ? src : 0);
    reverse(path.begin(), path.end());
    return (int)path.size() == tot / 2 + 1;
  }
};
undirectedEulerPath<202020> solver;
void solve() {
  int n;
  cin >> n;
  vector<int> b(n - 1), c(n - 1);
  for (int i = 0; i < n - 1; i++) cin >> b[i];
  for (int i = 0; i < n - 1; i++) cin >> c[i];
  for (int i = 0; i < n - 1; i++) {
    if (b[i] > c[i]) do {
        cout << ("-1") << "\n";
        return;
      } while (0);
  }
  vector<int> index;
  for (int i = 0; i < n - 1; i++) {
    index.push_back(b[i]), index.push_back(c[i]);
  }
  index = uniq(index);
  for (int i = 0; i < n - 1; i++) {
    b[i] = lower_bound((index).begin(), (index).end(), b[i]) - index.begin();
    c[i] = lower_bound((index).begin(), (index).end(), c[i]) - index.begin();
    solver.addedge(b[i], c[i]);
  }
  if (solver.get()) {
    for (auto& x : solver.path) cout << index[x] << " ";
  } else {
    do {
      cout << ("-1") << "\n";
      return;
    } while (0);
  }
}
