#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const double eps = 1e-10, Pi = 2 * acos(0);
long long LINF = 1LL << 60;
int n, m;
struct NODE {
  int v, id;
};
int e[N], d[N], cnt, num;
int a[N], b[N], vis[N], val[N];
stack<int> S;
queue<NODE> G[N];
map<int, int> mp;
void dfs(int u) {
  while (!G[u].empty()) {
    NODE cur = G[u].front();
    G[u].pop();
    if (e[cur.id] == 0) continue;
    e[cur.id] = 0;
    dfs(cur.v);
  }
  S.push(val[u]);
}
void solve() {
  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]);
  int cnte = 0, flag = 0;
  for (int i = 1; i < n; i++) {
    int u = a[i], v = b[i];
    if (u > v) {
      flag = 1;
      break;
    }
    if (!mp[u]) mp[u] = ++cnt, val[cnt] = u;
    if (!mp[v]) mp[v] = ++cnt, val[cnt] = v;
    e[++cnte] = 1;
    d[mp[u]]++;
    d[mp[v]]++;
    G[mp[u]].push((NODE){mp[v], cnte});
    G[mp[v]].push((NODE){mp[u], cnte});
  }
  int cntOdd = 0, s = 1;
  for (int i = 1; i <= cnt; i++) {
    if (d[i] % 2) {
      cntOdd++;
      s = i;
    }
  }
  if ((cntOdd == 2 || cntOdd == 0) && !flag) {
    dfs(s);
    if (S.size() != n)
      printf("-1\n");
    else {
      while (!S.empty()) {
        printf("%d ", S.top());
        S.pop();
      }
      printf("\n");
    }
  } else
    printf("-1\n");
}
int main() {
  int ce, c = 1, flag = 1;
  solve();
  return 0;
}
