#include <cstdio>
#include <cstring>
#include <map>
using namespace std;
const int N = 100050;
struct Snowflake
{
    int a[6];
    unsigned long long key;
} s[N];
int main()
{
    multimap<unsigned long long, int> m;
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
        scanf("%d%d%d%d%d%d", &s[i].a[0], &s[i].a[1], &s[i].a[2], &s[i].a[3], &s[i].a[4], &s[i].a[5]);
    }
    return 0;
}