def get_major_element(my_list):
available_items = set(my_list)
max_count, max_item = max((my_list.count(item), item) for item in available_items)
return max_item if max_count > len(my_list)/2 else None
l = [1, 2, 3, 2, 2, 4, 1, 2, 2, 2]
print(get_major_element(l))
ZGVmIGdldF9tYWpvcl9lbGVtZW50KG15X2xpc3QpOgogICAgYXZhaWxhYmxlX2l0ZW1zID0gc2V0KG15X2xpc3QpCiAgICBtYXhfY291bnQsIG1heF9pdGVtID0gbWF4KChteV9saXN0LmNvdW50KGl0ZW0pLCBpdGVtKSBmb3IgaXRlbSBpbiBhdmFpbGFibGVfaXRlbXMpCiAgICByZXR1cm4gbWF4X2l0ZW0gaWYgbWF4X2NvdW50ID4gbGVuKG15X2xpc3QpLzIgZWxzZSBOb25lCiAgICAKbCA9IFsxLCAyLCAzLCAyLCAyLCA0LCAxLCAyLCAyLCAyXQpwcmludChnZXRfbWFqb3JfZWxlbWVudChsKSk=