#34816: Python程式解答(有設定,同學數量不對,就不給輸入)


qwea6935@gmail.com (板弟)


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)