#include <bits/stdc++.h>
using namespace std;
const long long int racist = 100010;
long long int v1[racist], v2[racist], v3[racist];
int main() {
  long long int n, Lmin, Lmax, nr, max1 = -1;
  cin >> n >> Lmin >> Lmax;
  if (n == 1) {
    cin >> nr;
    cout << nr;
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    cin >> v1[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> v2[i];
  }
  for (int i = 0; i < n; ++i) {
    v3[i] = v2[i] + v1[i];
  }
  long long int min1 = 999999999;
  for (int i = 0; i < n; ++i) {
    min1 = min(min1, v3[i]);
  }
  int x = min1 - Lmin;
  for (int i = 0; i < n; ++i) {
    v3[i] -= x;
  }
  for (int i = 0; i < n; ++i) {
    max1 = max(max1, v3[i]);
  }
  if (max1 <= Lmax) {
    for (int i = 0; i < n; ++i) {
      cout << v3[i] << " ";
    }
  } else {
    cout << -1;
  }
  return 0;
}
