#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
#include<cstdio>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()

int main(void){
  vi used;
  vector<vector <double> > anum(24,vector<double>(2) );

  vector<vector <double> > fnum(8,vector<double>(2) );
  vector<vector <double> > snum(8,vector<double>(2) );
  vector<vector <double> > tnum(8,vector<double>(2) );
  
  
  rep(i,8){
    cin>>fnum[i][1]>>fnum[i][0];
    anum[i][0]=fnum[i][0];
    anum[i][1]=fnum[i][1];
  }

  
  rep(i,8){
    cin>>snum[i][1]>>snum[i][0];
    anum[i+8][0]=snum[i][0];
    anum[i+8][1]=snum[i][1];
  }
  
  rep(i,8){
    cin>>tnum[i][1]>>tnum[i][0];
    anum[i+16][0]=tnum[i][0];
    anum[i+16][1]=tnum[i][1];
  }
  /*
  rep(i,24){
    cout<<anum[i][0]<<" "<<anum[i][1]<<endl;
  }
  */
  sort(all(fnum));
  sort(all(snum));
  sort(all(tnum));
  sort(all(anum));
  rep(i,2){cout<<fnum[i][1]<< " " << fnum[i][0] <<endl; used.push_back(fnum[i][1]);}  
  rep(i,2){cout<<snum[i][1]<< " " << snum[i][0] <<endl; used.push_back(snum[i][1]);}  
  rep(i,2){cout<<tnum[i][1]<< " " << tnum[i][0] <<endl; used.push_back(tnum[i][1]);}
  int cnt = 0;
  int num = 0;
 
  while(cnt<2){
    bool next = false;
    rep(i,used.size()){
      if(anum[num][1]==used[i]){
	num++;
	next = true;
	break;
      }
    }
    if(next)continue;
    cout<< anum[num][1] <<  " " << anum[num][0] << endl;
    used.push_back(anum[num][1]);
    cnt++;
  }
 
} 