#include <bits/stdc++.h>

using namespace std;
long long fr = 100000;
int main()
{
    int n,m;
    map <int,int> visited;

    ios::sync_with_stdio(false); cin.tie(0);

    cin >> n >> m;
    visited[0] = 0;
    vector <int> to_mark;
    for(int i =1 ; i <=n;++i)
    {   int t,y, ite;
        long long x;
        cin >> t >> x >> y ;
        to_mark.clear();
        long long cr;
        for( auto p : visited)
        {
            ite = 1;
            if( t == 1 )
                    cr = p.first + x/fr + (x%fr ==0 ? 0 : 1);
            else cr = (1LL*p.first *x )/fr + ((1LL*p.first *x )%fr == 0 ? 0 : 1 );

            while( ite <= y && cr <= m &&  visited.find(cr) == visited.end() )
            { to_mark.push_back(cr);
            ite++;

                if( t == 1 )
                    cr = cr + x/fr + (x%fr ==0 ? 0 : 1);
            else cr = (1LL*cr *x )/fr + ((1LL*cr *x )%fr == 0 ? 0 : 1 );
            }

        }


        for(auto pos:to_mark)
            visited[pos] = i;

    }

    for(int i =1; i<=m;++i)
    {
        auto it = visited.find(i);
        if( it == visited.end())
            cout << "-1 ";
        else cout << (*it).second << " ";
    }

    return 0;
}
