def max_occurrences(list1):
    
    max_val = 0
    result = list1[0] 
    for i in list1:
        occu = list1.count(i)
        if occu > max_val:
            max_val = occu
            result = i 
    return result
def max_occurrences(list1):
    max_val = 0
    result = list1[0]
    _i_i = 0
    while _i_i < len(list1):
        i = list1[_i_i]
       
        occu = list1.count(i)
        if occu > max_val:
            max_val = occu
            result = i
        _i_i += 1
    return result