#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for(ll i = 0; i < (ll)(n); ++i)
#define FOR(i, a, b) for(ll i=(a); i < (ll)(b); ++i)
template<class T> inline bool chmax(T& a, T b) { if(a < b){ a=b; return 1; } return 0;}
template<class T> inline bool chmin(T& a, T b) { if(a > b){ a=b; return 1; } return 0;}

struct kigyo{
	int x,y,r;
	int a,b,c,d;
	bool flaga,flagb,flagc,flagd;
};
int n;
vector<kigyo> kigyoes;

int menseki(kigyo &k){
	return (k.c - k.a)*(k.d - k.b);
}

void input(){
	cin >> n;
	kigyoes.resize(n);
	REP(i,n){
		cin >> kigyoes[i].x >> kigyoes[i].y >> kigyoes[i].r;
		//cerr << "input i: " << i << "\n";
	}
}

void output(){
	REP(i,n){
		cout << kigyoes[i].a << " " << kigyoes[i].b << " ";
		cout << kigyoes[i].c << " " << kigyoes[i].d << "\n";
		
		
		//cerr << menseki(kigyoes[i]) - kigyoes[i].r << "\n";
	}
}

bool overlap(int i, int j){
	if((kigyoes[i].c <= kigyoes[j].a) || (kigyoes[j].c <= kigyoes[i].a)){
		return false;
	}else if((kigyoes[i].d <= kigyoes[j].b) || (kigyoes[j].d <= kigyoes[i].b)){
		return false;
	}else{
		return true;
	}
}

bool overlap_all(int i){
	REP(j,n){
		if(i==j) continue;
		if(overlap(i,j)) return true;
	}
	
	return false;
}


/*
void increase(int i){
	int step = 1;
	
	bool flaga = true;
	bool flagb = true;
	bool flagc = true;
	bool flagd = true;
	while(menseki(kigyoes[i]) <= kigyoes[i].r){
		
		if(flaga){
			kigyoes[i].a -= step;
		}
		if(overlap_all(i) || kigyoes[i].a < 0){
			kigyoes[i].a += step;
			flaga = false;
		}
		
		if(flagb){
			kigyoes[i].b -= step;
		}
		if(overlap_all(i) || kigyoes[i].b < 0){
			kigyoes[i].b += step;
			flagb = false;
		}
		
		if(flagc){
			kigyoes[i].c +=step;
		}
		if(overlap_all(i) || kigyoes[i].c > 9999){
			kigyoes[i].c -= step;
			flagc = false;
		}
		
		if(flagd){
			kigyoes[i].d +=step;
		}
		if(overlap_all(i) || kigyoes[i].d > 9999){
			kigyoes[i].d -= step;
			flagd = false;
		}
		
		if(!(flaga||flagb||flagc||flagd)){
			break;
		}
	}
	
}

void solve(){
	REP(i,n){
		kigyoes[i].a = kigyoes[i].x;
		kigyoes[i].b = kigyoes[i].y;
		kigyoes[i].c = kigyoes[i].a+1;
		kigyoes[i].d = kigyoes[i].b+1;
	}
	
	REP(i,n){
		increase(i);
	}
}*/

bool increase(int i){
	int step = 1;
	
	if(kigyoes[i].flaga){
		kigyoes[i].a -= step;
	}
	if(overlap_all(i) || kigyoes[i].a < 0){
		kigyoes[i].a += step;
		kigyoes[i].flaga = false;
	}
	if(menseki(kigyoes[i]) > kigyoes[i].r){
		kigyoes[i].flaga = false;
	}
	
	if(kigyoes[i].flagb){
		kigyoes[i].b -= step;
	}
	if(overlap_all(i) || kigyoes[i].b < 0){
		kigyoes[i].b += step;
		kigyoes[i].flagb = false;
	}
	if(menseki(kigyoes[i]) > kigyoes[i].r){
		kigyoes[i].flagb = false;
	}
	
	if(kigyoes[i].flagc){
		kigyoes[i].c +=step;
	}
	if(overlap_all(i) || kigyoes[i].c > 9999){
		kigyoes[i].c -= step;
		kigyoes[i].flagc = false;
	}
	if(menseki(kigyoes[i]) > kigyoes[i].r){
		kigyoes[i].flagc = false;
	}
	
	if(kigyoes[i].flagd){
		kigyoes[i].d +=step;
	}
	if(overlap_all(i) || kigyoes[i].d > 9999){
		kigyoes[i].d -= step;
		kigyoes[i].flagd = false;
	}
	if(menseki(kigyoes[i]) > kigyoes[i].r){
		kigyoes[i].flagd = false;
	}
	
	if(!(kigyoes[i].flaga||kigyoes[i].flagb||kigyoes[i].flagc||kigyoes[i].flagd)){
		return false;
	}
	
	return true;
}

void solve() {
	REP(i,n){
		kigyoes[i].a = kigyoes[i].x;
		kigyoes[i].b = kigyoes[i].y;
		kigyoes[i].c = kigyoes[i].a+1;
		kigyoes[i].d = kigyoes[i].b+1;
		
		kigyoes[i].flaga = true;
		kigyoes[i].flagb = true;
		kigyoes[i].flagc = true;
		kigyoes[i].flagd = true;
	}
	
	bool finish = true;
	while(finish){
		finish = false;
		REP(i,n){
			if(increase(i)) finish = true;
		}
	}
	
}

void calc(){
	double sum = 0.0;
	for(kigyo k:kigyoes){
		if((k.a <= k.x && k.x < k.c)
		&& (k.b <= k.y && k.y < k.d)){
			int s = menseki(k);
			double p = 1 - pow(1 - (double)min(k.r,s)/max(k.r,s),2);
			
			sum += p/n;
		}else{
			continue;
		}
	}
	
	cerr << (ll)(sum * 1e9) << "\n";
}

int main(){
	input();
	solve();
	calc();
	output();
	
	return 0;
}
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define pii pair<int, int>
#define FF first.first
#define FS first.second
#define pb push_back
using namespace std;
const ll N=1000006, INF=1e18, P=998244353;

ll q=1, n, m, x, y, z, l, r, k, a[N], b[N], c[50][50], ans, o, u, Ans[N];
vector <int> v[N], V;
string s="";

int main(){ios_base::sync_with_stdio(false), cin.tie(0);
	for (int i=0; i<=30; i++)c[0][i]=c[i][0]=1;
	for (int i=1; i<=30; i++){
        for (int j=1; j<=30; j++)
            c[i][j]=c[i][j-1]+c[i-1][j]/*, cout<<c[i][j]<<" ";cout<<endl*/;}

	cin>>x>>y>>n;n--;

	while(x+y){
        if(n<c[x-1][y])s+='a',x--;
        else n-=c[x-1][y],s+='b',y--;
    }
	cout<<s;


}
