students = int(input())
score = sorted(list(map(int,input().split(" "))))
print(*score)
if min(score)>=60:
print('best case')
else:
for i in range(59,-1,-1):
if i in score:
print(i)
break
if max(score)< 60:
print('worst case')
elif:
for i in range(60,100):
if i in score:
print(i)
break