#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int t;
while(cin>>t){
int *arr=new int [t];
for(int i=0;i<t;i++)
cin>>arr[i];
sort(arr,arr+t);
for(int i=0;i<t;i++){
if(i==0)
cout<<arr[i];
else
cout<<" "<<arr[i];
}
cout<<endl;
int min=-1;
int max=-1;
int count=0;
for(int i=0;i<=t;i++)
{
if(arr[i]>=60){
min=arr[i];
break;
}
}
for(int i=t-1;i>=0;i--)
{
if(arr[i]<60){
max=arr[i];
break;
}
}
if(max==-1)
cout<<"best case"<<endl;
else
cout<<max<<endl;
if(min==-1)
cout<<"worst case"<<endl;
else
cout<<min<<endl;
}
}
哪裡有問題嗎