#include <bits/stdc++.h>
using namespace std;
long long int minval = 1e18, maxval = -1e18, low, high;
long long int check(long long int x) {
  if (minval + x >= low && maxval + x <= high) {
    return 0;
  }
  if (minval + x < low) {
    return -1;
  }
  if (maxval + x > high) return 1;
}
int main() {
  long long int i, n;
  cin >> n >> low >> high;
  long long int a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    a[i] += x;
    maxval = max(maxval, a[i]);
    minval = min(minval, a[i]);
  }
  long long int l = -1e9, r = 1e9;
  while (r >= l) {
    long long int m = (l + r) / 2;
    if (check(m) == 0) {
      for (i = 0; i < n; i++) {
        cout << a[i] + m << " ";
      }
      return 0;
    } else if (check(m) > 0) {
      r = m - 1;
    } else
      l = m + 1;
  }
  cout << -1;
  return 0;
}
