#include
using namespace std;
#define ll long long
#define ld long double
signed main(){
const ll n = 20;
ll a[n];
for(ll i = 0; i < n; i++)
cin >> a[i];
sort(a,a+n);
ll cur_place = 10;
for(ll i = 10; i < 20; i++){
cout << cur_place <<"th place reached: " << a[i] << " scores" << "\n";</strong>
cur_place--;
}
cur_place = 11;
for(ll i = 0; i < 10; i++){
cout << cur_place <<"th place reached: " << a[i] << " scores" << "\n";</strong>
cur_place++;
}
}