#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf (int)(1e18)

signed main(){
  int N, T, K, i, j, k, l;
  scanf("%lld%lld", &N, &T);
  vector<int> h(N + 1, 0), sum(N + 1, 0);
  for(i = 1; i <= N; i++){
    scanf("%lld", &h[i]);
    sum[i] = sum[i - 1] + h[i];
  }
  vector<int> ans(N + 1, 1);
  int Torigin = T;
  int A;
  for(i = 1; i <= N; i += K){
    T = Torigin - sum[i - 1];
    for(k = 0; i + k <= N && h[i] >= h[i + k]; k++);
    K = k;
//    printf("(i, T, K) = (%lld, %lld, %lld)\n", i, T, K);
    j = T / h[i] + 1;
//    printf("j = %lld\n", j);
    for(l = j, k = 0; l >= max(0ll, j - K - 1); l--){
      if(l == 0){
        A = inf;
      }
      else{
        A = T - h[i] * (l - 1);
      }
//      printf("(l, A) = (%lld, %lld)\n", l, A);
      while(k < K && A >= sum[i + k] - sum[i - 1]){
//        printf("k = %lld\n", k);
        ans[i + k] = l + 1;
        k++;
      }
    }
  }
  for(i = 2; i <= N; i++){
    if(ans[i - 1] == 1){
      ans[i] = 1;
    }
  }
  for(i = 1; i <= N; i++){
    printf("%lld\n", ans[i]);
  }
  return 0;
}

