#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, l, r;
  int a[100000 + 1], b[100000 + 1], c[100000 + 1];
  cin >> n >> l >> r;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> c[i];
  int minm = INT_MAX, maxm = INT_MIN;
  for (int i = 0; i < n; i++) {
    b[i] = a[i] + c[i] - 1;
    minm = min(minm, b[i]);
    maxm = max(maxm, b[i]);
  }
  if (maxm > r and minm - (maxm - r) < l) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    b[i] -= (maxm - r);
    cout << b[i] << " ";
  }
  cout << endl;
  return 0;
}
