@[TOC](L2-021 点赞狂魔 (25 分))
#include<iostream>
#include<set>
#include<cstring>
#include<algorithm>
using namespace std;
struct name{
string s;
int z,j;
}a[101];
bool cmp(name a,name b){
if(a.j==b.j){
return a.z<b.z;
}
else
return a.j>b.j;
}
int main ()
{
int n,i,j,t,p;
scanf("%d",&n);
getchar();
for(i=0;i<n;i++){
cin>>a[i].s>>a[i].z;
set<int >st;
for(j=0;j<a[i].z;j++){
scanf("%d",&p);
st.insert(p);
}
a[i].j=st.size();
st.clear();
}
sort(a,a+n,cmp);
for(i=0;i<3;i++){
if(i==0){
if(a[i].s=="\0")
cout<<"-";
else
cout<<a[i].s;
}
else{
if(a[i].s=="\0")
cout<<" "<<"-";
else
cout<<" "<<a[i].s;
}
}
return 0;
}