• + 6 comments

    Using python collections FTW.

    import sys
    from collections import Counter
    
    n = int(input().strip())
    types = list(map(int, input().strip().split(' ')))
    
    birds = Counter(types)  # Counts the array into a dictionary
    print(birds.most_common(1)[0][0])