#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
int n, m = 0;
int a[200010], b[200010], discre[2 * 200010], degree[200010];
vector<int> to[200010];
int ans[200010], anssize = 0;
void Discrete() {
  for (int i = 1; i < n; i++) discre[i] = a[i];
  for (int i = n; i <= 2 * n - 2; i++) discre[i] = b[i - n + 1];
  sort(discre + 1, discre + 2 * n - 1);
  for (int i = 1; i <= 2 * n - 2; i++)
    if (discre[i] != discre[m]) discre[++m] = discre[i];
}
void dfs(int x) {
  vector<int>::iterator it;
  for (it = to[x].begin(); it != to[x].end(); it = to[x].begin()) {
    int v = *it;
    to[x].erase(it);
    to[v].erase(find(to[v].begin(), to[v].end(), x));
    dfs(v);
  }
  ans[++anssize] = x;
}
int main() {
  ios::sync_with_stdio(false);
  scanf("%d", &n);
  for (int i = 1; i < n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++) {
    scanf("%d", &b[i]);
    if (a[i] > b[i]) {
      cout << "-1" << endl;
      return 0;
    }
  }
  Discrete();
  for (int i = 1; i < n; i++)
    a[i] = lower_bound(discre + 1, discre + m + 1, a[i]) - discre;
  for (int i = 1; i < n; i++)
    b[i] = lower_bound(discre + 1, discre + m + 1, b[i]) - discre;
  for (int i = 1; i < n; i++) {
    to[a[i]].push_back(b[i]);
    to[b[i]].push_back(a[i]);
    degree[a[i]]++;
    degree[b[i]]++;
  }
  int s = 0, e = 0;
  for (int i = 1; i <= m; i++) {
    if (degree[i] % 2) {
      if (!s)
        s = i;
      else if (!e)
        e = i;
      else {
        cout << "-1" << endl;
        return 0;
      }
    }
  }
  if (s == 0) s = 1;
  dfs(s);
  if (anssize < n) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = anssize; i >= 1; i--) cout << discre[ans[i]] << " ";
  return 0;
}
