#include <bits/stdc++.h>
using namespace std;
int n, w, isi[1000], cap[1000], l, r, mid, n1;
vector<pair<int, int> > v;
void sim(int x, int k) {
  for (int i = v.size() - 1; i >= 0; i--) {
    if (!w) break;
    if (isi[v[i].second] + x <= v[i].first) {
      isi[v[i].second] += x;
      w -= x;
    } else {
      w -= (v[i].first - isi[v[i].second]);
      isi[v[i].second] = v[i].first;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> w;
  for (int i = 1; i <= n; i++) {
    cin >> cap[i];
    isi[i] = ceil(cap[i] * 1.0 / 2);
    v.push_back(make_pair(cap[i], i));
    w -= ceil(cap[i] * 1.0 / 2);
    if (w < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  n1 = n;
  sort(v.begin(), v.end());
  while (w > 0) {
    sim(floor(w * 1.0 / n), n);
    while (!floor(w * 1.0 / n) and n > 0) --n;
    if (n == 0) break;
    if (w == 0) break;
  }
  for (int i = 2; i <= n1; i++) {
    if (cap[i] > cap[i - 1] and isi[i] < isi[i - 1]) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 1; i <= n1; i++)
    if (i == 1)
      cout << isi[i];
    else
      cout << ' ' << isi[i];
  cout << endl;
}
