#include <bits/stdc++.h>
using namespace std;
struct node {
  int a, b, id;
};
int isused[111111];
node inter[111111];
int res[111111], allx[111111], xsize, degree[111111], rsize;
vector<pair<int, int> > e[111111];
int nowe[111111];
void find_o(int now) {
  while (nowe[now] != e[now].size()) {
    pair<int, int> p = e[now][nowe[now]++];
    int k = p.first;
    if (!isused[p.second]) {
      isused[p.second] = 1;
      find_o(k);
    }
  }
  res[++rsize] = now;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < n; i++)
    scanf("%d", &inter[i].a), allx[++xsize] = inter[i].a, inter[i].id = i;
  int flagx = 1;
  for (int i = 1; i < n; i++) {
    scanf("%d", &inter[i].b), allx[++xsize] = inter[i].b;
    if (inter[i].a > inter[i].b) {
      flagx = 0;
    }
  }
  sort(allx + 1, allx + xsize + 1);
  xsize = unique(allx + 1, allx + 1 + xsize) - allx - 1;
  if (xsize > n || !flagx) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i < n; i++) {
    int k1 = lower_bound(allx + 1, allx + xsize + 1, inter[i].a) - allx,
        k2 = lower_bound(allx + 1, allx + xsize + 1, inter[i].b) - allx;
    e[k1].emplace_back(k2, i), e[k2].emplace_back(k1, i), degree[k1]++,
        degree[k2]++;
  }
  vector<int> tmp;
  for (int i = 1; i < xsize + 1; i++)
    if (degree[i] & 1) tmp.push_back(i);
  if (tmp.size() != 2 && tmp.size() != 0) {
    printf("-1\n");
    return 0;
  }
  int st = 1;
  if (tmp.size() == 2) st = tmp[0];
  find_o(st);
  for (int i = 1; i < n; i++)
    if (!isused[i]) {
      printf("-1\n");
      return 0;
    }
  for (int i = 1; i < n + 1; i++) printf("%d ", allx[res[i]]);
  puts("");
}
