#include #include #include #include using namespace std; int t,n; struct node { char s[110]; int year; }e[110]; int cmp(struct node a,struct node b) { return a.year>b.year; } int main() { scanf("%d",&t); while(t--) { char str[120]; scanf("%d",&n); gets(str); for(int i=0;i