#include<bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
#define swap(a,b) (a^=b^=a^=b)
#define format(a) memset(a,0,sizeof(a))
#define rep(x,y,z) for(int x=y;x<=z;x++)
#define dec(x,y,z) for(int x=y;x>=z;x--)
#define mst(x) memset(x,0,sizeof(x))
#define int long long
const int maxn=2e5+20;
inline int read()
{
    int ans=0;
    char last=' ',ch=getchar();
    while(ch<'0'|ch>'9')last=ch,ch=getchar();
    while(ch>='0' && ch<='9')ans=ans*10+ch-'0',ch=getchar();
    if(last=='-')ans=-ans;
    return ans;
}
const int DIV = 1e5;
inline int ceil(int x,int y)
{
    return(x+y-1)/y;
}
int n,m,t,x,y;
int ans[maxn];
void op(int &cur)
{
    if(t==1)
    {
        cur=cur+ceil(x,DIV);
    }
    else
    {
        cur=ceil(cur*x,DIV);
    }
}
signed main()
{
    n=read(),m=read();
    memset(ans,-1,sizeof(ans));
    ans[0]=0;
    rep(i,1,n)
    {
        t=read(),x=read(),y=read();
        dec(j,m,0)
        {
            if(ans[j]==-1)continue;
            int cur=j;
            rep(k,1,y)
            {
                op(cur);
                if(cur>m||ans[cur]>=0)break;
                ans[cur]=i;
            }
        }
    }
    rep(i,1,m)cout<<ans[i]<<" ";
    cout<<"\n";
    return 0;
}
