#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 9;
long long arr[N];
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> v;
  int arr[n];
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back({x, i});
    arr[i] = x / 2 + x % 2;
    k -= x / 2 + x % 2;
  }
  if (k < 0) return puts("-1");
  sort(v.rbegin(), v.rend());
  int i = 0;
  while (k-- > 0) {
    if (v[i].first == arr[v[i].second])
      k++;
    else
      arr[v[i].second]++;
    i = (i + 1) % v.size();
  }
  for (int i = 0; i < n; i++) cout << arr[i] << ' ';
  return 0;
}
