#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>

#define f first
#define s second

using namespace std;

int main(){
  vector<pair<double, int> > t1(8), t2(8), t3(8), t4;
  
  for(int i = 0 ; i < 8 ; i++) cin >> t1[i].s >> t1[i].f;
  for(int i = 0 ; i < 8 ; i++) cin >> t2[i].s >> t2[i].f;
  for(int i = 0 ; i < 8 ; i++) cin >> t3[i].s >> t3[i].f;
  
  sort(t1.begin(), t1.end());
  sort(t2.begin(), t2.end());
  sort(t3.begin(), t3.end());
  
  for(int i = 2 ; i < 4 ; i++){
    t4.push_back(t1[i]);
    t4.push_back(t2[i]);
    t4.push_back(t3[i]);
  }
  
  sort(t4.begin(), t4.end());
  cout.precision(4);
  cout.setf(ios::showpoint);
  for(int i = 0 ; i < 2 ; i++) cout << t1[i].s << ' ' << t1[i].f << endl;
  for(int i = 0 ; i < 2 ; i++) cout << t2[i].s << ' ' << t2[i].f << endl;
  for(int i = 0 ; i < 2 ; i++) cout << t3[i].s << ' ' << t3[i].f << endl;
  for(int i = 0 ; i < 2 ; i++) cout << t4[i].s << ' ' << t4[i].f << endl;
  return 0;
}