#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch & 15);
    ch = getchar();
  }
  return x;
}
struct edge {
  int n, nxt;
  bool used;
  edge(int n, int nxt) {
    this->n = n;
    this->nxt = nxt;
    used = 0;
  }
  edge() {}
} e[200100];
int head[100100], ecnt = -1;
void add(int from, int to) {
  e[++ecnt] = edge(to, head[from]);
  head[from] = ecnt;
  e[++ecnt] = edge(from, head[to]);
  head[to] = ecnt;
}
int b[100100], c[100100], r[200100], d[100100];
int stk[200100], tp = 0, cnt = 0;
void dfs(int x) {
  int i = head[x];
  while (~i) {
    ++cnt;
    head[x] = e[i].nxt;
    if (!e[i].used) {
      e[i].used = 1;
      e[i ^ 1].used = 1;
      dfs(e[i].n);
    }
    i = head[x];
  }
  stk[++tp] = x;
}
int main() {
  memset(head, -1, sizeof(head));
  int n = read();
  for (int i = 1; i < n; ++i) {
    b[i] = read();
    r[i] = b[i];
  }
  for (int i = 1; i < n; ++i) {
    c[i] = read();
    if (c[i] < b[i]) {
      puts("-1");
      return 0;
    }
    r[n + i - 1] = c[i];
  }
  sort(r + 1, r + 2 * n - 1);
  int m = unique(r + 1, r + 2 * n - 1) - r - 1;
  for (int i = 1; i < n; ++i) {
    b[i] = lower_bound(r + 1, r + m + 1, b[i]) - r;
    c[i] = lower_bound(r + 1, r + m + 1, c[i]) - r;
    add(b[i], c[i]);
    ++d[b[i]];
    ++d[c[i]];
  }
  int s = 1, flag = 0;
  for (int i = 1; i <= m; ++i)
    if (d[i] & 1) {
      ++flag;
      s = i;
    }
  if (flag > 2) {
    puts("-1");
    return 0;
  }
  dfs(s);
  if (tp != n)
    puts("-1");
  else
    for (int i = 1; i <= tp; ++i) printf("%d ", r[stk[i]]);
  return 0;
}
