#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const long long MOD = 1000000007;
inline long long read() {
  char ch = getchar();
  long long x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long i, j, k, n, m, sum, maxx, minn = 100000000001, ans, x, y, flag, cc,
                                    a[1000005], b[1000005], c[1000005], l, r;
int main() {
  cin >> n >> l >> r;
  for (int i = (0); i < (n); i++) a[i] = read();
  for (int i = (0); i < (n); i++) b[i] = read();
  for (int i = (0); i < (n); i++) {
    c[i] = a[i] + b[i];
    maxx = max(maxx, c[i]);
    minn = min(minn, c[i]);
  }
  if (maxx - minn > r - l) {
    cout << -1 << endl;
    return 0;
  } else
    for (int i = (0); i < (n); i++) cout << c[i] - minn + l << " ";
  cout << endl;
  return 0;
}
