#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
ll mod = 1e9 + 7;
ll MOD = 1e9 + 7;
ll INF = 1e18;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  ll t;
  cin >> t;
  for (int index = 0; index < (int)(t); index++) {
    ll n;
    cin >> n;
    ll sum = 0;
    for (int i = 0; i < (int)(n); i++) {
      ll k, l, r;
      cin >> k >> l >> r;
    }
  }
}
