#include <bits/stdc++.h>
const int MAXN = 1e5 * 5;
const int base = 1e9 + 7;
const int N = 5000;
using namespace std;
int n;
long long l, r;
int a[MAXN], p[MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> l >> r;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
  for (int i = (1); i <= (n); ++i) cin >> p[i];
  long long lef = -1e15;
  long long rig = 1e15;
  for (int i = (1); i <= (n); ++i) {
    lef = max(lef, l - a[i] - p[i] + 1);
    rig = min(rig, r - a[i] - p[i] + 1);
  }
  if (lef > rig)
    cout << -1;
  else {
    long long x = rig;
    for (int i = (1); i <= (n); ++i) {
      long long xx = (long long)x + a[i] + p[i] - 1;
      cout << xx << ' ';
    }
  }
  return 0;
}
