#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<iomanip>
using namespace std;

int main()
{
	map<double, double> x;
	map<double, double> y;
	map<double, double> z;
	map<double, double> s;
	auto k = x.begin();
	for (int a = 0; a < 8; a++) {
		double b, c;
		cin >> b >> c;
		x.insert(pair<double,double>(c,b));
	}
	k = x.begin();
	k++; k++;
	s.insert(pair<double, double>(k->first, k->second));
	k++;
	s.insert(pair<double, double>(k->first, k->second));
	for (int a = 0; a < 8; a++) {
		double b, c;
		cin >> b >> c;
		y.insert(pair<double, double>(c,b));
	}
	k = y.begin();
	k++; k++;
	s.insert(pair<double, double>(k->first, k->second));
	k++;
	s.insert(pair<double, double>(k->first, k->second));
	for (int a = 0; a < 8; a++) {
		double b, c;
		cin >> b >> c;
		z.insert(pair<double,double>(c,b));
	}
	k =z.begin();
	k++; k++;
	s.insert(pair<double, double>(k->first, k->second));
	k++;
	s.insert(pair<double, double>(k->first, k->second));

	k = x.begin();
	cout <<  k->second<< fixed << setprecision(2) << " "<<k->first<< endl;
	k++;
	cout << fixed << setprecision(0) << k->second << fixed << setprecision(2) << " " << k->first << endl;
	k = y.begin();
	cout << fixed << setprecision(0) << k->second << fixed << setprecision(2) << " " << k->first << endl;
	k++;
	cout << fixed << setprecision(0) << k->second << fixed << setprecision(2) << " " << k->first << endl;
		k = z.begin();
		cout << fixed << setprecision(0) << k->second << fixed << setprecision(2) << " " << k->first << endl;
	k++;
	cout << fixed << setprecision(0) << k->second << fixed << setprecision(2) << " " << k->first << endl;
	k = s.begin();
	cout << fixed << setprecision(0) << k->second << fixed << setprecision(2) << " " << k->first << endl;
	k++;
	cout << fixed << setprecision(0) << k->second << fixed << setprecision(2) << " " << k->first << endl;
}