#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
vector<pair<int,string>> tn;
int arr[3];
char a;
for(int i = 0;i < 3;i++)
{
int num;
string temp;
cin >> num >> arr[i] >> temp;
a = temp[0];
tn.push_back(pair(num, temp));
}
sort(tn.begin(),tn.end(),greater<>());
sort(arr,arr+3);
cout << arr[0]%100 << arr[1]%100 << arr[2]%100;
cout << endl << tn[0].second[0] << tn[1].second[0] << tn[2].second[0];
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: