#include <bits/stdc++.h>
using namespace std;
struct ahasan {
  int idx;
  int val;
  int str;
};
ahasan a[105];
bool st(ahasan ob1, ahasan ob2) { return ob1.val > ob2.val; }
bool st2(ahasan ob1, ahasan ob2) { return ob1.idx < ob2.idx; }
int main() {
  int n, w, flag = 0, tmp;
  cin >> n >> w;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &tmp);
    a[i].val = tmp;
    a[i].idx = i;
    if (tmp % 2 == 0) {
      a[i].str = tmp / 2;
      w = w - (tmp / 2);
      if (w < 0) {
        flag = 1;
      }
    } else {
      a[i].str = (tmp / 2) + 1;
      w = w - a[i].str;
      if (w < 0) {
        flag = 1;
      }
    }
  }
  int ses;
  sort(a + 1, a + n + 1, st);
  while (1) {
    for (int i = 1; i <= n; i++) {
      if (w >= 1 && a[i].str < a[i].val) {
        a[i].str++;
        w--;
      }
      if (w <= 0) goto ses;
    }
  }
ses:;
  for (int i = 1; i < n; i++) {
    if (a[i].str < a[i + 1].str && a[i].val > a[i + 1].val) {
      flag = 1;
    }
  }
  if (flag == 1) {
    cout << "-1" << endl;
    return 0;
  }
  sort(a + 1, a + n + 1, st2);
  for (int i = 1; i <= n; i++) {
    cout << a[i].str << " ";
  }
  return 0;
}
