#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  vector<long long int> v;
  vector<long long int> d;
  vector<long long int> p;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long int a, b, c;
    cin >> a >> b >> c;
    v.push_back(a);
    d.push_back(b);
    p.push_back(c);
  }
  long long int ans = 0;
  for (int i = 0; i < p.size(); i++) {
    if (p[i] >= 0) {
      long long red = 0;
      for (int x = i + 1; x < n; x++) {
        if (p[x] >= 0) {
          p[x] -= (v[i] + red);
          if (p[x] < 0) red += d[x];
          if (v[i]) v[i]--;
        }
      }
      ans++;
    }
  }
  cout << ans << endl;
  for (int i = 0; i < p.size(); i++) {
    if (p[i] >= 0) cout << i + 1 << " ";
  }
  return 0;
}
