#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

#define int long long
#define rep(i,n) for(int i = 0; i < (n); i++)
#define INF ((long long)1e18)
#define MOD ((int)1e9+7)
#define endl "\n"

#define yn(f) ((f)?"Yes":"No")
#define YN(f) ((f)?"YES":"NO")

#define MAX

signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);
	
	int n, t;
	int sum = 0, speed = 0;
	vector<int> h;
	vector<pair<int,int>>ans;
	
	cin>>n>>t;
	
	h.resize(n);
	
	for(int i = 0; i < n; i++){
		cin>>h[i];
	}
	
	for(int i = 0; i < n; i++){
		pair<int,int> temp;
		if(sum >= t){
			temp.first = 1;
			temp.second = 1;
		} else {
			// cout<<"sum ->"<<sum<<" sp -> "<<speed<<endl; 
			if(speed <= h[i]){
				temp.first = (t - sum)/h[i] + 1;
				temp.second = ((t - sum)/h[i])*h[i] + sum;
				speed = h[i];
			} else {
				// cout<<t<<" - "<<ans[i-1].second<<" "<<h[i]<<yn(t - ans[i-1].second < h[i])<<endl;
				if(t - ans[i-1].second < h[i]){
					temp.first = ans[i-1].first-1;
					temp.second = ans[i-1].second - speed + h[i];
				} else {
					temp.first = ans[i-1].first;
					temp.second = ans[i-1].second + h[i];
				}
			}
		}
		ans.push_back(temp);
		sum += h[i];
	}
	
	for(int i = 0; i < n; i++){
		// cout<<ans[i].first<<" "<<ans[i].second<<endl;
		cout<<ans[i].first<<endl;
	}
	return 0;
}
