n = int(input())
sc = sorted(list(map(int,input().split())))
num_of_g = len(sc)
if num_of_g != n:
print("成績跟同學數量不對")
print(*sc)
if sc[0] >= 60:
print("best case")
else:
s = list(filter(lambda x:x < 60, sc))[-1]
print(s)
if sc[-1] < 60:
print("worst case")
else:
s = list(filter(lambda x:x >= 60, sc))[0]
print(s)