Lazarus Instant Runoff Voting

Each round, if no candidate receives more than 50% of the votes, we eliminate the candidate with the least votes and redistribute the votes.
Ties are broken in order of candidate listing.


Candidates

Each candidate is separated on a new line.
Candidates are numbered starting from 1 from the top.

Ballots

Each ballot is separated on a new line.
A ballot should be a sequence of numbers referencing a candidate, separated by spaces.
The sequence should be in order of most preferred to least preferred.
Ballots do not need to rank all the candidates.



Results

Input candidates and ballots and click calculate!