Create a java program that reads an input of n lines with the first line being the number of people in the contest and the remaining lines a numeric 9 digit code for each person that gets a vote. Then output the person or code that gets the most votes as the winner. Output no winner if theres no majority.
input:
3
222222222
567891012
222222222
output:
222222222 wins 2 out of 3