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

#define fi first
#define se second
#define pb push_back
#define sz(v) (int)v.size()
#define all(v) v.begin(),v.end()

using ll = long long;
using ii = pair<ll,ll>;

const int N = 201;
const int M = 1e5+10;

int n, m;
int vis[M];

ll type1(ll u, ll x) {
  return (u * 100000 + x + 99999) / 100000;
}
ll type2(ll u, ll x) {
  return (u * x + 99999) / 100000; 
}

int main() {
  scanf("%d %d", &n, &m);

  for(int i = 1; i <= m; i++) vis[i] = -1;

  for(int it = 1; it <= n; it++) {
    ll ty, x, y;
    scanf("%lld %lld %lld", &ty, &x, &y);

    if(ty == 1) {
      for(int u = m; u >= 0; u--) if(vis[u] != -1) {
        ll _u = u;
        for(int i = 1; i <= y; i++) {
          ll v = type1(_u, x);
          if(v > m || v < 0) break;
          if(vis[v] != -1) break;
          vis[v] = it;
          _u = v;
        }
      }
    }
    else {
      for(int u = m; u >= 0; u--) if(vis[u] != -1) {
        ll _u = u;
        for(int i = 1; i <= y; i++) {
          ll v = type2(_u, x);
          if(v > m || v < 0) break;
          if(vis[v] != -1) break;
          vis[v] = it;
          _u = v;
        }
      }
    }
  }
  for(int i = 1; i <= m; i++) printf("%d ", vis[i]); puts("");
  return 0;
}