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

typedef long long ll;

void self_min(ll &a, ll b) {
    if (a == -1)
        a = b;
    else
        a = min(a, b);
}

void solve() {
    double d = 100000.0;
    ll t, x, y, n, m; cin >> n >> m;
    vector<ll> ans(m + 1, -1);
    ans[0] = 0;
    for (ll i = 1; i <= n; i++) {
        cin >> t >> x >> y;
        vector<int> K(m + 1);
        for (int j = 0; j <= m; j++) {
            if (ans[j] == -1)
                continue;
            ll k = (ll)ceil(t == 1 ? j + x / d : j * x / d);
            if (k > m)
                continue;
            if (ans[j] < i) {
                self_min(ans[k], i);
                K[k] = 1;
            } else {
                if (K[j] < y) {
                    self_min(ans[k], i);
                    K[k] = 1 + K[j];
                }
            }
        }
    }
    for (ll i = 1; i <= m; i++)
        cout << ans[i] << ' ';
    cout << '\n';
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    solve();
    return 0;
};

// 31062nd
// 88228th