#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mem(x,y) memset(x,y,sizeof(x))
const int M=2e5+10;
const int inf=2e9+10;
const ll mod=1e9+7;
const int bit=32;
const double pi=acos(-1.0);
int ans[M],d[M];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	mem(ans,-1);
	const ll B=1e5;
	ans[0]=0;
	for(int i=1;i<=n;i++){
		int t;
		ll x,y;
		scanf("%d%lld%lld",&t,&x,&y);
		for(int j=0;j<=m;j++){
			d[j]=(ans[j]!=-1?0:inf);
		}
		for(int j=0;j<=m;j++){
			if(d[j]==inf)
			continue;
			ll np;
			if(t==1)
			np=j+(x+B-1)/B;
			else
			np=ceil(1.0*j*x/B);
			if(np>m)
			break;
			d[np]=min(d[j]+1,d[np]);
			//printf("%lld\n",np);
		}
		for(int j=0;j<=m;j++){
			if(d[j]<=y&&ans[j]==-1){
				ans[j]=i;
			}
		}
	}
	for(int i=1;i<=m;i++){
		printf("%d ",ans[i]);
	}
	puts("");
	return 0;
}
