#include <bits/stdc++.h> #include<math.h> using namespace std; struct Student{ char name[10]; char gender; char number[10]; int grade; }man,woman; const int MAX_LEN = 100005; int main(){ woman.gender = 'F'; woman.grade = -1; man.gender = 'M'; man.grade = 101; int n; cin>>n; for(int i = 0;i<n;++i){ Student temp; scanf("%s %s %s %d",&temp.name,&temp.gender,&temp.number,&temp.grade); if(temp.gender == 'F' && temp.grade > woman.grade){ memset(woman.name,'