import collections
def sort_cut(list,num):
    new_list = collections.Counter(list)
    dic = sorted(new_list.items(),key= lambda x:x[1],reverse=True)[:num]
    result =[x[0] for x in dic]
    return result

