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

// #include <ext/pb_ds/assoc_container.hpp> 
// #include <ext/pb_ds/tree_policy.hpp> 
// using namespace __gnu_pbds; 

// #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

#define fast                        ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
 
 
#define rep(i,a,b)               for(int i=a;i<b;i++)
 
#define pfy                       cout<<("YES")
#define pfn                      cout<<("NO")
 
typedef long long ll;
typedef long double ld;
#define nl                        cout<<("\n")
#define int ll
 
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef vector< ii > vii;
 
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
 
#define F first
#define S second
 
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
 
const ll hell=LLONG_MAX;
 
/* */
 
signed solve(){

    int n; cin>>n;
    int m; cin>>m;

    vector<int> dp(m+1,hell);

    dp[0]=0;

    for(int j=1;j<=n;j++){

        int t,y;
        long double x;
        cin>>t>>x>>y;

        // trace(t,x,y);

        vector<int> vis(m+1,0);

        for(int i=m;i>=0;i--){

            int cur=i;
            if(dp[cur]==hell) continue;

            for(int a=1;a<=y;a++){

                int newcur;
                if(t==1) newcur=cur+ceill(x/100000);
                else newcur=ceill(cur*x/100000);

                // trace(newcur);

                if(newcur>m) break;

                if(vis[newcur]==1) break;
                vis[newcur]=1;
                dp[newcur]=min(dp[newcur],j);
                vis[newcur]=1;
                cur=newcur;

            }


        }


    }

    for(int i=1;i<=m;i++){
        if(dp[i]==hell) cout<<-1<<" ";
        else cout<<dp[i]<<" ";
    }


    return 0;
}
 
signed main(){
 
    int t=1;
     
    fast;            //  freopen("input.txt","r",stdin); freopen ("output.txt","w",stdout);
    // cin>>t;
     
    while(t--){
        solve();
    }
     
    return 0;

}