#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define IO ios::sync_with_stdio(false);cin.tie(0)

const ll base = 100000;

int n, m;

int main() {
    IO; //freopen("in.txt", "r", stdin);
    cin >> n >> m;
    vector<int> ans(m + 5);
    ans[0] = 1;
    for(int i = 0; i < n; ++i) {
        ll op, x, y; cin >> op >> x >> y;    
        int yy = y;
        for(int j = m - 1; j >= 0; --j) {
            if(!ans[j]) {
                continue;
            }
            y = yy;
            if(op == 1) {
                ll val = j;
                bool ok = 0;
                //cerr << x << ' ' << base << '\n';
                if(x % base != 0) {
                    ok = 1;
                }
                while(y--) {
                  //  cerr << val << ' ' << x / base << ' ' << ok << '\n';
                    val += x / base;
                    if(ok) {
                        ++val;
                    }
                    if(val > m) {
                        break;
                    }
                    if(ans[val]) {
                        break;
                    }
                    ans[val] = i + 1;
                }
            } else {
                ll val = j, lim = m;
                while(y--) {
                    val *= 1ll * x;
                    if(val % base != 0) {
                        val += base;
                    }
                    val /= base;
                    if(val > m) {
                        break;
                    }
                    if(ans[val]) {
                        break;
                    }
                    ans[val] = i + 1;
                }
            }
        }
    }
    for(int i = 1; i <= m; ++i) {
        if(!ans[i]) {
            cout << -1;
        } else {
            cout << ans[i];
        }
        cout << ' ';
    }
    return 0;
}
//-1 -1 1 -1 -1 1 -1 -1 -1 3 -1 2 3 -1 -1 3 -1 -1 -1 3 