Part 1. Definition
You are given a dialog between 2 or more individuals. You need to generate the number of the speaker (e.g. 1 for Speaker 1) who had the most lines in the dialog. If there is a tie, output the answer '0'.
Part 2. Example
Speaker 1: What do you think we should do for our 10th wedding anniversary?
Speaker 2: Hm, how about we take a vacation? Somewhere sandy and warm.
Speaker 1: Well, if we're going to go out of the country, you need to be sure to renew your passport. It expired over a year ago!
Speaker 2: How about we get something expensive instead of travelling. We could get a new car.
Speaker 1: Is this your way of telling me that you want me to buy you a car?
Answer: 1
Explanation: In this dialog, there are 5 lines of speech. Three of them belong to Speaker 1 and two of them belong to Speaker 2. Therefore, Speaker 1 has the most lines in the dialog.
Part 3. Exercise
Speaker 1: All right girls, and man. Let's see your final tallies. Ohhhh, Debbie, 321 boxes of cookies, Very nice.
Speaker 2: Not nice enough.
Speaker 1: Charla, 278. Sorry, dear, but still good.
Speaker 2: Good for a scrud.
Speaker 1: Oh, yes Elizabeth. Ah, 871.
Speaker 2: That's crap!! Sister Brown Bird. Good going.
Speaker 1: Who's next?
Speaker 2: Hi there!
Speaker 1: Hi. And batting for Sarah, Ross Geller, 872. Although, it looks like you bought an awful lot of cookies yourself.
Speaker 2: Um, that is because my doctor says that I have a very serious.... nuget.... Diffency.
Speaker 3: Tell us what happened, Brown Bird Ross.
Speaker 2: Well, I lost. Some little girl loaned her uniform to her nineteen year old sister, who went down to the U.S.S. Nimitz, and sold over 2,000 boxes.
Answer:
2