#include <bits/stdc++.h>
using namespace std;
#define IO ios_base::sync_with_stdio(false); cin.tie(NULL);

#define endl '\n'

const long long scale = 100000;

int main() { IO;
  int n, m;
  cin >> n >> m;

  vector<int> answer(m + 1, -1);
  answer[0] = 0;
  for (int step = 1; step <= n; ++step) {
    long long t, x, y;
    cin >> t >> x >> y;
    for (int i = answer.size() - 1; i >= 0; --i) {
      if (answer[i] != -1) {
        long long index = i;
        for (long long k = 1; k <= y; ++k) {
          if (t == 1) {
            index += (x + scale - 1) / scale;
          } else {
            index = (index * x + scale - 1) / scale;
          }
          if (index >= answer.size() || answer[index] >= 0) { break; }
          answer[index] = step;
        }
      }
    }
  }

  for (int i = 1; i < answer.size(); ++i) { cout << answer[i] << " "; }
  cout << endl;

  return 0;
}
