#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
long long qpow(long long a, long long b) {
  long long ans = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b > 0 ? gcd(b, a % b) : a; }
int b[maxn];
int c[maxn];
vector<int> g[maxn], v;
int de[maxn];
int num[maxn];
map<pair<int, int>, int> M;
map<int, int> id;
int s, t;
int ans[maxn], tot;
int aa[maxn], top;
void dfs(int u) {
  ans[++top] = u;
  for (auto to : g[u]) {
    if (M[make_pair(u, to)] == 0) continue;
    M[make_pair(u, to)]--;
    M[make_pair(to, u)]--;
    de[u]--;
    de[to]--;
    dfs(to);
    break;
  }
}
void fleury(int u) {
  top = 1;
  ans[top] = u;
  while (top > 0) {
    int k = 0;
    if (de[ans[top]]) {
      top--;
      dfs(ans[top + 1]);
    } else {
      aa[tot++] = num[ans[top]];
      top--;
    }
  }
}
int main() {
  int n, m, T;
  cin >> n;
  for (int i = 1; i < n; i++) scanf("%d", &b[i]), v.push_back(b[i]);
  for (int i = 1; i < n; i++) scanf("%d", &c[i]), v.push_back(c[i]);
  sort((v).begin(), (v).end());
  v.erase(unique((v).begin(), (v).end()), v.end());
  for (int i = 1; i <= ((int)(v).size()); i++) {
    num[i] = v[i - 1];
    id[v[i - 1]] = i;
  }
  v.clear();
  vector<int> temp;
  bool flag = 1;
  for (int i = 1; i < n; i++) {
    int x, y;
    x = id[b[i]];
    y = id[c[i]];
    de[x]++;
    de[y]++;
    if (b[i] > c[i]) {
      flag = 0;
      break;
    }
    temp.push_back(x);
    temp.push_back(y);
    g[x].push_back(y);
    g[y].push_back(x);
    M[make_pair(x, y)]++;
    M[make_pair(y, x)]++;
  }
  if (!flag) {
    cout << "-1" << endl;
    return 0;
  }
  sort((temp).begin(), (temp).end());
  temp.erase(unique((temp).begin(), (temp).end()), temp.end());
  for (auto i : temp) {
    if (de[i] & 1) v.push_back(i);
  }
  if (((int)(v).size()) != 2 && ((int)(v).size()) != 0) {
    cout << "-1" << endl;
    return 0;
  } else if (((int)(v).size()) == 2) {
    s = v[0];
    t = v[1];
  } else {
    s = 1, t = 1;
  }
  fleury(s);
  if (tot < n) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 0; i < tot; i++) {
    printf("%d ", aa[i]);
  }
  return 0;
}
