CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #955 #957 →

#956. Majority element

If some element appears more than n/2 times, print it, otherwise print `None`. ### Input The first line has n, the second line has n integers separated by spaces. ### Output Answer.

Examples

Input
3
1 2 2
Output
2
Input
9
1 1 1 3 2 3 3 3 3
Output
3

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!