#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const double EPS = 1e-10;
const double PI = acos(-1);
vector<int> EulerianPath(int s, vector<vector<int>>& g) {
  function<void(const int, vector<int>&)> dfs = [&](int u, vector<int>& path) {
    while (not g[u].empty()) {
      int v = g[u].back();
      g[u].pop_back();
      for (int i = 0; i < (int)g[v].size(); ++i)
        if (g[v][i] == u) {
          g[v].erase(g[v].begin() + i);
          break;
        }
      dfs(v, path);
    }
    path.push_back(u);
  };
  vector<int> path;
  dfs(s, path);
  reverse(path.begin(), path.end());
  return path;
}
class ENekoAndFlashback {
 public:
  vector<int> A;
  vector<vector<int>> G;
  int get(int x) const {
    return lower_bound((A).begin(), (A).end(), x) - A.begin();
  }
  void solve(std::istream& in, std::ostream& out) {
    ios_base::sync_with_stdio(false);
    in.tie(nullptr), out.tie(nullptr);
    int N;
    in >> N;
    A.resize(2 * N - 2);
    vector<int> B(N - 1), C(N - 1);
    for (int i = (0); i < (N - 1); ++i) {
      in >> B[i];
      A[i] = B[i];
    }
    for (int i = (0); i < (N - 1); ++i) {
      in >> C[i];
      A[N - 1 + i] = C[i];
    }
    sort((A).begin(), (A).end());
    A.erase(unique((A).begin(), (A).end()), A.end());
    int nn = (int)(A).size();
    G.resize(nn);
    for (int i = (0); i < (N - 1); ++i) {
      if (B[i] > C[i]) {
        out << "-1\n";
        return;
      }
      int u = get(B[i]), v = get(C[i]);
      G[u].push_back(v), G[v].push_back(u);
    }
    int s = -1, t = -1;
    for (int i = (0); i < (nn); ++i) {
      if ((int)(G[i]).size() & 1) {
        if (s == -1)
          s = i;
        else if (t == -1)
          t = i;
        else {
          out << "-1\n";
          return;
        }
      }
    }
    if (s == -1) s = 0;
    vector<int> P = EulerianPath(s, G);
    if ((int)(P).size() != N)
      out << "-1\n";
    else {
      for (auto p : P) out << A[p] << ' ';
      out << '\n';
    }
  }
};
int main() {
  ENekoAndFlashback solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
