#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1e5 + 10;
int n, a[Maxn], b[Maxn], c[Maxn], l, r;
int main() {
  cin >> n >> l >> r;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> c[i];
  for (int i = 0; i < n; i++) b[i] = a[i] + c[i];
  int Min = b[0], Max = b[0];
  for (int i = 0; i < n; i++) {
    Min = min(Min, b[i]);
    Max = max(Max, b[i]);
  }
  if (Min < l && (Max + l - Min) > r) {
    cout << -1 << endl;
    return 0;
  }
  if (Max > r && (Min - Max + r) < l) {
    cout << -1 << endl;
    return 0;
  }
  if (Min < l)
    for (int i = 0; i < n; i++) b[i] += l - Min;
  if (Max >= r)
    for (int i = 0; i < n; i++) b[i] -= (Max - r);
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  return 0;
}
