3

h2022032 2023-12-30 21:15:36

include<bits/stdc++.h>

using namespace std;

bool cmp(string a,string b) { string suba,subb; suba = a.s.substr(6,8),subb=b.substr(6,8); if(suba>subb){ return true; } else if(suba ==subb){ if(a>b){ return true; } return false; } else{ return false; } } int main(){ int b; string s[100],a; cin>>b; for(int i=0;i<b;i++) { cin>>s[i]; } sort(s+7,s+14+1); for(int i=0;i<b;i++) { cout>>s[i]>>endl; } return 0; }