#include<iostream>
#include<iomanip>
using namespace std;

void bubbleSort( int* a, double* b, int n )
{
    for( int i = 0; i < n; i++ )
        for( int j = n - 1; j >= i + 1; j-- )
        {
            if( b[j] < b[j-1] )
            {
                double temp1 = b[j];
                b[j] = b[j-1];
                b[j-1] = temp1;
                
                int temp2 = a[j];
                a[j] = a[j-1];
                a[j-1] = temp2;
            }
        }
}

int main()
{
    int a[8], c[18];
    double b[8], d[18];

    for( int j = 0; j < 3; j++ )
    {
        for( int i = 0; i < 8; i++ )
            cin >> a[i] >> b[i];

        bubbleSort( a, b, 8 );
        cout << fixed << setprecision(2) << a[0] << " " << b[0] << endl;
        cout << fixed << setprecision(2) << a[1] << " " << b[1] << endl;
        for( int i = 2; i < 8; i++ )
        {
            c[i+j*6-2] = a[i];
            d[i+j*6-2] = b[i];
        }
    }

    bubbleSort( c, d, 18 );
    cout << fixed << setprecision(2) << c[0] << " " << d[0] << endl;
    cout << fixed << setprecision(2) << c[1] << " " << d[1] << endl;

    return 0;
}
