#include<iostream> #include<algorithm> #define maxn 210 #define maxm 100010 #define ll long long usingnamespacestd;
int n, m, t[maxn], y[maxn];
ll x[maxn];
bool f[maxm]; int ans[maxm]; intmain(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
cin >> n >> m; for (int i = 1; i <= n; ++i) cin >> t[i] >> x[i] >> y[i]; f[0] = 1; for (int i = 1; i <= m; ++i) ans[i] = -1; for (int i = 1; i <= n; ++i) for (int j = m; ~j; --j) { if (!f[j]) continue; ll s = j; for (int k = 1; k <= y[i]; ++k) { if (t[i] == 1) s = s + (x[i] + 99999) / 100000; else s = (s * x[i] + 99999) / 100000; if (s > m || f[s]) break; f[s] = 1; ans[s] = i; } } for (int i = 1; i <= m; ++i) cout << ans[i] << " \n"[i == m]; return0; }