#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int n;
struct stu{
int sq;
int df;
int jq;
string name;
}t[55];
bool cmp1(const stu &x,const stu &y){
if(x.df>y.df) return true;
else if(x.df<y.df) return false;
else
if(x.sq>y.sq) return true;
else if(x.sq<y.sq) return false;
else
if(x.jq>y.jq) return true;
else return false;
}
bool cmp2(const stu &x,const stu &y){
if(x.name<y.name) return true;
else return false;
}
int main(){
cin>>n;
int n2=n*(n-1)/2;
for(int i=1;i<=n;i++) cin>>t[i].name;
for(int i=1;i<=n2;i++){
string a,b;
cin>>a;
b=a.substr(a.find('-')+1);
a=a.substr(0,a.find('-'));
int d,f;
char e;
cin>>d>>e>>f;
for(int j=1;j<=n;j++)
if(t[j].name==a)
if(d>f){
t[j].sq++;
t[j].df+=3;
t[j].jq+=d;
}
else{
t[j].df++;
t[j].jq+=d;
}
else if(t[j].name==b)
if(f>d){
t[j].sq++;
t[j].df+=3;
t[j].jq+=d;
}
else{
t[j].df++;
t[j].jq+=d;
}
}
sort(t+1,t+n+1,cmp1);
sort(t+1,t+n/2+1,cmp2);
for(int i=1;i<=n/2;i++) cout<<t[i].name<<endl;
return 0;
}
各位大佬可以帮忙跳跳错吗,卡第4个点了