#include <bits/stdc++.h>
using namespace std;
const int maxn = 200007;
const int inf = (1LL << 29);
map<int, multiset<int> > g;
map<int, int> de;
int ans[maxn], e1, a[maxn], b[maxn];
void euler_path(int u) {
  while (g[u].size()) {
    for (auto i = g[u].begin(); i != g[u].end(); i++) {
      int v = *i;
      g[u].erase(i);
      auto it = g[v].find(u);
      g[v].erase(it);
      euler_path(v);
      break;
    }
  }
  ans[++e1] = u;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n;
  for (int i = 1; i < n; i++) cin >> a[i];
  for (int i = 1; i < n; i++) cin >> b[i];
  for (int i = 1; i < n; i++) {
    if (a[i] > b[i]) {
      cout << -1;
      return 0;
    }
    g[a[i]].insert(b[i]);
    g[b[i]].insert(a[i]);
    de[a[i]]++;
    de[b[i]]++;
  }
  int sum = 0, now = 0;
  for (auto it = de.begin(); it != de.end(); ++it) {
    if ((*it).second & 1) {
      sum++;
      now = (*it).first;
    }
  }
  if (sum == 0 || sum == 2) {
    euler_path(sum == 0 ? (*de.begin()).first : now);
    if (e1 != n)
      cout << -1;
    else
      for (int i = 1; i <= e1; i++) cout << ans[i] << " ";
  } else {
    cout << -1;
  }
  return 0;
}
