#include <bits/stdc++.h>
using namespace std;
const int Inf = 1 << 30;
const int N = 1e2 + 10;
int n, k;
struct node {
  int x;
  int id;
} a[N];
int ans[N];
bool cmp(node a, node b) { return a.x < b.x; }
map<int, int> q;
int main() {
  while (~scanf("%d %d", &n, &k)) {
    q.clear();
    memset(ans, 0, sizeof(ans));
    memset(a, 0, sizeof(a));
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i].x);
      a[i].id = i;
    }
    sort(a, a + n, cmp);
    for (int i = 0; i < n; i++) q[a[i].id] = i;
    int t = 0;
    bool flag = 0;
    for (int i = 0; i < n; i++) {
      if (a[i].x / 2 * 2 == a[i].x)
        t = a[i].x / 2;
      else
        t = a[i].x / 2 + 1;
      if (t <= k) {
        ans[i] = t;
        k -= t;
      } else {
        flag = 1;
        break;
      }
    }
    if (flag)
      puts("-1");
    else {
      for (int i = n - 1; i >= 0; i--) {
        if (k >= a[i].x - ans[i]) {
          k -= a[i].x - ans[i];
          ans[i] = a[i].x;
        } else {
          ans[i] += k;
          break;
        }
      }
      for (int i = 0; i < n; i++)
        printf("%d%c", ans[q[i]], i == n - 1 ? '\n' : ' ');
    }
  }
  return 0;
}
