#include <bits/stdc++.h>
using namespace std;
int n, l, r, mnb, mxb, ir;
int a[200000];
int b[200000];
int c[200000];
int main() {
  cin >> n >> l >> r;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  mnb = (1 << 30);
  for (int i = 0; i < n; i++) {
    b[i] += a[i] - a[0];
    mnb = min(b[i], mnb);
    mxb = max(b[i], mxb);
  }
  if (mnb < l && mxb > r) {
    cout << "-1\n";
    return 0;
  }
  if (mnb < l) {
    ir = l - mnb;
    if (mxb + ir > r) {
      cout << "-1\n";
      return 0;
    }
  } else if (mxb > r) {
    ir = -1 * (mxb - r);
    if (mnb + ir < l) {
      cout << "-1\n";
      return 0;
    }
  }
  for (int i = 0; i < n; i++) cout << b[i] + ir << " ";
  cout << endl;
  return 0;
}
