#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;


int n;
struct xyr {
  int x;
  int y;
  int r;
};
struct sq {
  int x1;
  int y1;
  int x2;
  int y2;
  int s;
};

vector<xyr> ad;
vector<sq> ans;
clock_t start;
vector<vector<int>> area(10000, vector<int>(10000, -1));

void input () {
  cin >> n;
  ad.resize(n);
	rep(i, n) cin >> ad[i].x >> ad[i].y >> ad[i].r;
}
void init() {
  ans.resize(n);
  rep(i, n) {
    ans[i].x1 = ad[i].x;
    ans[i].y1 = ad[i].y;
    ans[i].x2 = ad[i].x+1;
    ans[i].y2 = ad[i].y+1;
    ans[i].s = 1;
  }
}

bool isTimeLimit(clock_t start) {
  clock_t end = clock();
  const double time = static_cast<double>(end - start) / CLOCKS_PER_SEC * 1000.0;
  if (time >= 4000) return true;
  else return false;
}

void output() {
  rep(i, n) {
    cout << ans[i].x1 << " " << ans[i].y1 << " " << ans[i].x2 << " " << ans[i].y2 << endl;
  }
}

int main() {
	// 入力
	input();
  init();
  int cnt = 0;
	while (1) {
    if (cnt%1000 == 0) {
      if (isTimeLimit(start)) break;
    }
    cnt++;
	}
  output();
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vd = vector<double>;
using vp = vector<P>;
using vs = vector<string>;
using pq = priority_queue<int,vector<int>,greater<int>>;/*top()で最小値取得*/
using pq2 = priority_queue<int, vector<int>, less<int>>;/*top()で最大値取得*/

#define INF 1000000005
#define mod 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i = 0; i < (n); ++i) /*0からn-1までのrep*/
#define rrep(i,n) for(int i = 1; i <= (n); ++i) /*1からnまでのrep*/
#define drep(i,n) for(int i = (n)-1; i >= 0; --i) /*n-1から0までのrep*/
#define srep(i,s,t) for (int i = s; i < t; ++i) /*sからt-1までのrep*/
#define each(a,b) for(auto& (a): (b)) /*よくわからん*/
#define all(v) (v).begin(),(v).end() /*全選択*/
#define sz(v) (int)(v).size() /*大きさ*/
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end()) /*重複削除*/
#define cmx(x,y) x=max(x,y) /*最大値*/
#define cmn(x,y) x=min(x,y) /*最小値*/
#define fi first
#define se second
#define pb push_back //a.push_back(最後に任意の数字を追加); a.pop_back();
#define rev(v) reverse((v).begin(),(v).end());
#define sob(v) sort((v).begin(), (v).end(),greater<int>()); /*大きい順にソート*/
#define so(v) sort((v).begin(), (v).end()); /*小さい順にソート*/
#define yn {puts("Yes");}else{puts("No");}
#define dame { puts("-1"); return 0;}/*だめ*/
const double eps = 1e-10;
const ll MOD = 1000000007;
constexpr ll MAX = 5000000;

ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int ctoi(char c) {
	switch (c) {
		case '0': return 0;
		case '1': return 1;
		case '2': return 2;
		case '3': return 3;
		case '4': return 4;
		case '5': return 5;
		case '6': return 6;
		case '7': return 7;
		case '8': return 8;
		case '9': return 9;
		default: return 0;
	}
}

ll divup(ll x, ll y){
	if(x%y==0){
		return x/y;
	} else {
		return x/y + 1;
	}
}

int main(){
	int n,w;
	cin >> n >> w;
	cout << n/w << endl;
    return 0;
}