#include<iostream>
#include<cstring>
#include<algorithm>
#define maxn 210
using namespace std;
typedef struct Node{
string ss;
int sum,id;
Node() { id=0,sum=0;} //初始化
}node;
int n,g,s,c,m;
bool cmp(node a,node b){
if(a.sum>b.sum) return true;
else if(a.sum<b.sum) return false;
else return a.ss<b.ss;
}
int main(){
node a[maxn];
while(cin>>n>>g>>s>>c>>m){
if(n==0 &&g==0&&s==0&&c==0&&m==0) break;
for(int i=0;i<n;i++){
cin>>a[i].sum>>a[i].ss;
a[i].id=i+1;
}
sort(a,a+n,cmp);
for(int i=0;i<n;i++){
if(a[i].id==m){
if(i+1<=g) cout<<"Accepted today? I've got a golden medal :)"<<endl;
else if(i+1<=s+g) cout<<"Accepted today? I've got a silver medal :)"<<endl;
else if(i+1<=c+g+s) cout<<"Accepted today? I've got a copper medal :)"<<endl;
else cout<<"Accepted today? I've got an honor mentioned :)"<<endl;
break;
}
}
}
return 0;
}