#include <bits/stdc++.h>
using namespace std;
const int INF = (int)2e9;
const long long INFL = (long long)9e18;
const int MAXINT = ((~0) ^ (1 << 31));
const long long MAXLL = ((~0) ^ ((long long)1 << 63));
template <class T>
inline T pow2(T a) {
  return a * a;
}
template <class T>
inline bool mineq(T& a, T b) {
  return (a > b) ? (a = b, true) : false;
}
template <class T>
inline bool maxeq(T& a, T b) {
  return (a < b) ? (a = b, true) : false;
}
const int maxn = 2e5;
long long n, b[maxn], c[maxn], rs[maxn], cnt, str, flg, p[maxn], mark[maxn],
    sr[maxn];
map<long long, long long> s;
map<pair<long long, long long>, long long> chk;
vector<pair<long long, long long> > g[maxn];
vector<long long> ans;
void dfs(long long w) {
  for (p[w]; p[w] < g[w].size(); p[w]++) {
    if (!mark[g[w][p[w]].second]) {
      mark[g[w][p[w]].second] = 1;
      dfs(g[w][p[w]].first);
    }
  }
  ans.push_back(w);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  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 (s[b[i]] == 0) {
      s[b[i]] = s.size();
      sr[s[b[i]]] = b[i];
    }
    if (s[c[i]] == 0) {
      s[c[i]] = s.size();
      sr[s[c[i]]] = c[i];
    }
  }
  for (int i = 0; i < n - 1; i++) {
    chk[{b[i], c[i]}]++;
    g[s[b[i]]].push_back({s[c[i]], i});
    g[s[c[i]]].push_back({s[b[i]], i});
  }
  str = 1;
  for (int i = 1; i <= s.size(); i++) {
    if (g[i].size() % 2 != 0) {
      cnt++;
      str = i;
    }
  }
  if (cnt != 2 && cnt != 0) flg = 1;
  dfs(str);
  for (int i = 0; i < ans.size() - 1; i++) {
    long long x = min(sr[ans[i]], sr[ans[i + 1]]);
    long long y = max(sr[ans[i]], sr[ans[i + 1]]);
    if (chk[{x, y}])
      chk[{x, y}]--;
    else
      flg = 1;
  }
  if (ans.size() != n) flg = 1;
  if (flg)
    cout << -1;
  else {
    for (int i = 0; i < ans.size(); i++) cout << sr[ans[i]] << " ";
  }
}
