
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  vector< pair<double,int> > v1(8),v2(8),v3(8);

  rep(i,8)cin>>v1[i].second>>v1[i].first;
  rep(i,8)cin>>v2[i].second>>v2[i].first;
  rep(i,8)cin>>v3[i].second>>v3[i].first;

  sort(all(v1));
  sort(all(v2));
  sort(all(v3));

  cout<<shosu(2)<<v1[0].second<<" "<<v1[0].first<<endl;
  cout<<shosu(2)<<v1[1].second<<" "<<v1[1].first<<endl;
  cout<<shosu(2)<<v2[0].second<<" "<<v2[0].first<<endl;
  cout<<shosu(2)<<v2[1].second<<" "<<v2[1].first<<endl;
  cout<<shosu(2)<<v3[0].second<<" "<<v3[0].first<<endl;
  cout<<shosu(2)<<v3[1].second<<" "<<v3[1].first<<endl;

  vector< pair<double,int> > p(18);
  rep(i,6)p[i]=v1[i+2];
  rep(i,6)p[6+i]=v2[i+2];
  rep(i,6)p[12+i]=v3[i+2];
  sort(all(p));

  cout<<shosu(2)<<p[0].second<<" "<<p[0].first<<endl;
  cout<<shosu(2)<<p[1].second<<" "<<p[1].first<<endl;

}