TASK 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'.
PROBLEM: Speaker 1: ...once you know the stories, it's not that bad. First marriage, wife's hidden sexuality, not my fault. Second marriage, said the wrong name at the altar, a little my fault. Third marriage, well they really shouldn't allow you to get married when you're that drunk and have writing all over your face, Nevada's fault. 
Speaker 2: Okay, so what do you think ladies? Who wouldn't be interested? Who wouldn't want to date him? 
Speaker 3: Well the divorces don't bother me, I'd date him. But, not while he's still married. 
Speaker 2: Okay, what about you? Wouldn't you want a date? 
Speaker 4: Actually, I'm dating at all anymore. See, I figured out that I was only dating guys that were like y'know bad for me, so until I work that out... 
Speaker 2: Whatever! What about you Meg? 
Speaker 5: Well, I don't care about the divorces either, but I wouldn't date him. It's just that he's obviously still in love with this Rachel girl. 
Speaker 1: What?! 
Speaker 2: She said, "He's obviously still in love with this Rachel girl." 
Speaker 1: This is crazy! I mean, yes-yes Rachel is my good friend and I-I have loved her in the past, but now, she is just my wife! Phoebe, will you-will you help me out here? 
Speaker 2: Well, I thought you loved her when you-when you married her. 
Speaker 1: We were drunk! I would've married uh, Joey with that amount of alcohol! 
Speaker 2: Hey! You could do a lot worse than Joey Tribbiani!! 
Speaker 1: Look, I'm sorry, but you guys are wrong. I just don't want to be divorced three times. 
Speaker 2: Yes, and now he's using this three divorces reason because he wants to stay married to her because he loves her. I must say, "Well done!" Bravo Meg. 
Speaker 1: Okay! Fine! Fine! If-if this is what you think, forget about the whole three divorce thing! Okay, I-I'll go to my lawyer's office right now and get this marriage annulled! Okay?! Because she means nothing to me! Noth--Nothing!! 
Speaker 5: Okay now I wouldn't date you because you seem a little creepy. 
Speaker 4: I am so attracted to him right now.

SOLUTION: 2

PROBLEM: Speaker 1: Hi you guys! 
Speaker 2, 
Speaker 3: Hey! 
Speaker 2: Oo...what's in the bag? 
Speaker 1: Oh er...well you know Emma started crawling? I realized that this place, is very unsafe for a baby. So I went to the store and got some stuff to baby-proof the apartment. 
Speaker 2: Oh...baby-proofing...Why is this such a big deal now? Y'know...when I was a kid it was like... "Whoops! Joey fell down the stairs!" or er... "Whoops! Joey electrocuted himself again!" Huh! 
Speaker 3: Anyway erm...Are you going to get a handyman to install this stuff? 
Speaker 1: No. I was just going to do this myself. 
Speaker 2: You're gonna do it? 
Speaker 1: Yeah...Why? You don't think a woman can do this? 
Speaker 2: Oh...Women can. You...can't. 
Speaker 1: Monica...would you please tell Joey that he is a pig? 
Speaker 3: You're a pig. And you can't do this. 
Speaker 1: Wha!? What!? Come on! I found the hardware store all by myself! 
Speaker 2: The hardware store is right down the street. 
Speaker 1: There is a hardware store right down the street?

SOLUTION: 1

PROBLEM: Speaker 1: Well, I feel like a snack! 
Speaker 2: Do you want some shortbread? Eh that's Scottish like you are. 
Speaker 1: Oh no thanks. I don't like any thing from my Scottish heritage. 
Speaker 3: What?! 
Speaker 1: Well it's just my entire family was run out of Scotland by...Vikings. Anyway, lots of bad memories. 
Speaker 3: Oh well, it sounds to me like your family is ready to uh, rediscover its Scottish roots. 
Speaker 2: No! No-no they're not. They're still very angry! But y'know Chandler is also half-Swedish. You know what the Swedish people are famous for? Sitting down and being quiet. 
Speaker 3: Well yeah-yeah the Scottish history is so much more... 
Speaker 2: You can not play bagpipes at the wedding!! 
Speaker 3: How did you know about that?! 
Speaker 1: We heard you play all the way from your apartment! 
Speaker 3: Were you the ones called the cops?! 
Speaker 1: That's not really important right now. What is important is; while we appreciate the gesture, we just don't feel bagpipes are appropriate for our wedding. 
Speaker 3: Why not? 
Speaker 1: Because we hate them. 
Speaker 3: Come on that's not fair! I mean you haven't even heard me play! 
Speaker 1: We have heard you play. 
Speaker 3: No, you've heard my practice. Okay? Just-just give me a chance to perform for you and then decide whatever you want. And I'm not going to tell you what song I'm gonna play either. But uh, let's just say when it's over I'll bet there will be a we bit o' celebration.

SOLUTION:
3

