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: Oh hey Mon? Rach is here! Ohh, you're still pregnant. Oh, I'm sorry. I know how uncomfortable you are. Y'know what? You look great. Yeah, like fifty bucks.
Speaker 2: Oh, I have to go pee. Apparently this baby thinks that my bladder is a squeeze toy.
Speaker 3: Damnit! Damnit!! Here's your fifty bucks!
Speaker 1: It's interesting that you lost. Now, I forget, do you like to lose?
Speaker 3: Now stop it! Double or nothing that she has it by tomorrow!
Speaker 1: Fine! You're on!
Speaker 3: Okay.
Speaker 1: Until then, General Grant, why don't you set up camp right there.
Speaker 4: Hey is Rachel here? We have a doctor's appointment.
Speaker 3: She's in the bathroom.
Speaker 4: Rach, we gotta go.
Speaker 2: In a minute!!!
Speaker 4: People ask me why we're not together, I just don't know what to tell them.
Speaker 2: All right, all right. Let's go!
Speaker 4: Uh, do you wanna go change first? The doctor's keeping the office open late for us, but if you hurry...
Speaker 2: No, I'm fine.
Speaker 4: Really? You don't think that's a little inappropriate.
Speaker 1: Good God man don't anger it.
Speaker 2: Ross, it is 100 degrees outside. For the first time in weeks, I am somewhat comfortable.
Speaker 4: Fine! Fine! Y'know what? Whatever you want. Okay? You're the mommy.
Speaker 2: Oh uh-uh pal! Don't call me mommy! It's bad enough you call your own mother that.
Speaker 3: I'm actually with her on this one.
Answer:
2