#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>
#include <iomanip>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;

vector<pair<double, int >>kumi1;
vector<pair<double, int >>kumi2;
vector<pair<double, int >>kumi3;

int main(){

	REP(i, 8){
		pair<double, int>tmp;
		cin >> tmp.second;
		cin >> tmp.first;
		kumi1.push_back(tmp);
	}
	REP(i, 8){
		pair<double, int>tmp;
		cin >> tmp.second;
		cin >> tmp.first;
		kumi2.push_back(tmp);
	}
	REP(i, 8){
		pair<double, int>tmp;
		cin >> tmp.second;
		cin >> tmp.first;
		kumi3.push_back(tmp);
	}

	sort(kumi1.begin(), kumi1.end());
	sort(kumi2.begin(), kumi2.end());
	sort(kumi3.begin(), kumi3.end());

	cout << fixed << setprecision(2) << kumi1[0].second << " " << kumi1[0].first << endl << kumi1[1].second << " " << kumi1[1].first << endl;
	kumi1.erase(kumi1.begin());
	kumi1.erase(kumi1.begin());
	cout << fixed << setprecision(2) << kumi2[0].second << " " << kumi2[0].first << endl << kumi2[1].second << " " << kumi2[1].first << endl;
	kumi2.erase(kumi2.begin());
	kumi2.erase(kumi2.begin());
	cout << fixed << setprecision(2) << kumi3[0].second << " " << kumi3[0].first << endl << kumi3[1].second << " " << kumi3[1].first << endl;
	kumi3.erase(kumi3.begin());
	kumi3.erase(kumi3.begin());

	auto aa = kumi1.begin();
	auto bb = kumi2.begin();
	auto cc = kumi3.begin();

	if (*aa < *bb){
		if (*aa < *cc){
			cout << fixed << setprecision(2) << aa->second << " " << aa->first << endl;
			kumi1.erase(aa);
		}
		else
		if (*aa > *cc){
			cout << fixed << setprecision(2) << cc->second << " " << cc->first << endl;
			kumi3.erase(cc);
		}
	}
	else{
		if (*bb < *cc){
			cout << fixed << setprecision(2) << bb->second << " " << bb->first << endl;
			kumi2.erase(bb);
		}
		else
		if (*bb > *cc){
			cout << fixed << setprecision(2) << cc->second << " " << cc->first << endl;
			kumi3.erase(cc);
		}

	}
	////////

	aa = kumi1.begin();
	bb = kumi2.begin();
	cc = kumi3.begin();

	if (*aa < *bb){
		if (*aa < *cc){
			cout << fixed << setprecision(2) << aa->second << " " << aa->first << endl;
			kumi1.erase(aa);
		}
		else
		if (*aa > *cc){
			cout << fixed << setprecision(2) << cc->second << " " << cc->first << endl;
			kumi3.erase(cc);
		}
	}
	else{
		if (*bb < *cc){
			cout << fixed << setprecision(2) << bb->second << " " << bb->first << endl;
			kumi2.erase(bb);
		}
		else
		if (*bb > *cc){
			cout << fixed << setprecision(2) << cc->second << " " << cc->first << endl;
			kumi3.erase(cc);
		}

	}

	return 0;
}