#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, m;
    cin >> n >> m;
    vector<int> v(m + 1, 0), ans(m + 1, 0);
    v[0] = 1;
    int t, y;long long x;
    auto op = [&](int& k) {
        if (t == 1)
            k = (k + ceil(x / 100000.0));
        else
            k = (int)ceil((k * x) / 100000.0);
    };
    for (int time = 1;time <= n;time++) {
        cin >> t >> x >> y;
        auto v2 = v;
        for (int i = 0;i <= m;i++) {
            if (v[i]) {
                int temp = i;
                for (int j = 0;j < y;j++) {
                    op(temp);
                    if (temp > m or v[temp] == 1)
                        break;
                    v2[temp] = 1;
                    ans[temp] = time;
                }
            }
        }
        v = move(v2);
    }
    for (int i = 1;i <= m;i++)
        cout << (ans[i] == 0 ? -1 : ans[i]) << " ";
}