#include <stdio.h>
#include <math.h>
int main(){
    long long int n, x[200], y[200], r[200], a[200], b[200], c[200], d[200];
    scanf( "%lld", &n );
    for( int i = 0 ; i < n ; i++ ){
        scanf( "%lld%lld%lld", &x[i], &y[i], &r[i] );
    }

    for (int i = 0; i < n ; i++){
        a[i] = floor( 10000 / n ) * i ;
        b[i] = 0 ;
        c[i] = floor( 10000 / n ) * ( i + 1 ) - 1; 
        d[i] = 9999;         
    }

    for( int i = 0 ; i < n ; i++ ){
        printf( "%lld %lld %lld %lld\n", a[i], b[i], c[i], d[i] );
    }


    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
using ull = unsigned long long;
#define loop(n) for(ull i=0;i<n;i++)

int main(){
  int n;
  cin >> n;
  loop(n){
    ull x,y,r;
    cin >> x >> y >> r;
    cout << x << " " << y << " " << x+1 << " " << y+1 << endl;
  }
  return 0;
}