#include <bits/stdc++.h>
using namespace std;
bool cmp1(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
bool cmp2(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, d;
  vector<pair<int, int>> v;
  pair<int, int> p;
  cin >> n >> d;
  for (int i = 0, a, b; i < n; i++) {
    cin >> a;
    b = ceil(a * 1.0 / 2.0);
    p = make_pair(a, i);
    v.push_back(p);
    d -= b;
  }
  if (d < 0) {
    cout << "-1" << endl;
    return 0;
  }
  sort(v.begin(), v.end(), cmp1);
  for (int i = 0, h, r; i < n; i++) {
    h = ceil(v[i].first * 1.0 / 2.0);
    r = v[i].first - h;
    h += min(d, r);
    v[i].first = h;
    d -= min(d, r);
  }
  sort(v.begin(), v.end(), cmp2);
  for (int i = 0; i < n; i++) {
    cout << v[i].first << ' ';
  }
}
