#include<iostream>
#include<queue>
#include<stack>
#include<algorithm>
#include<vector>
#include<cmath>
#include<deque>
#include<memory.h>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstdio>
#include<cstring>
#include<string.h>
#include<algorithm>
#include<string>
using namespace std;
#define ll long long
#define ull unsigned long long
#define Design ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }
ll lcm(ll a, ll b) { return a * b / GCD(a, b); }
const ll N = 1e5 + 7;
const ll inf = 1e18 + 1;
const ll mod = 1e9 + 7;
const int P = 131;
const double eps = 1e-8;
int n, m;
int ans[N], cnt[N];
int main() {
    Design;
    cin >> n >> m;
    ll p = 1e5;
    ll limit = p * m;
    memset(ans, -1, sizeof ans); ans[0] = 0;
    for (int i = 1; i <= n; i++) {
        int op;
        ll x, y;
        cin >> op >> x >> y;
        memset(cnt, 0, sizeof cnt);
        for (int j = 0; j <= m; j++) {
            if (ans[j] == -1 || cnt[j] == y)continue;
            if (op & 1) {
                ll k = (x - 1) / p + 1;
                if (j + k <= m && ans[j + k] == -1)ans[j + k] = i, cnt[j + k] = cnt[j] + 1;
            }
            else {
                if (x * j <= limit && j) {
                    ll k = (j * x - 1) / p + 1;
                    if (ans[k] == -1)ans[k] = i, cnt[k] = cnt[j] + 1;
                }
            }
        }
       // for (int j = 1; j <= m; j++)cout << ans[j] << " "; cout << "\n";
    }
    for (int i = 1; i <= m; i++)cout << ans[i] << " "; cout << "\n";
    return 0;
}


