#include <bits/stdc++.h>
using namespace std;

int n, t; 

int main(){

	scanf("%d %d", &n,&t); int mx = 0;
	for (int i = 1, x; i <= n; i ++){
		scanf("%d", &x);
		mx = max(x, mx);
		int now = t / mx + 1;
		if((now-1)*mx + x <= t) now++;
		
		if(t<=0){printf("1\n");t=0;continue;}
		else printf("%d\n", now);		
		t -= x;
	}
	
    return 0;
}

