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: Where's Chandler?
Speaker 2: Ah, he can't make it, he said he had to his... Whoa-oh!
Speaker 3: Joey? Joey Tribbiani?
Speaker 3: Joey I can see you okay? You're hiding behind the coats.
Speaker 2: Phew, close one.

SOLUTION: 2

PROBLEM: Speaker 1: Oh, she's coming up! She's coming up!
Speaker 2: Folks, when we come back we'll be talking about her new book, 'Euphoria Unbound': the always interesting Nora Tyler Bing. You might wanna put the kids to bed for this one.
Speaker 3: Y'know, we don't have to watch this. Weekend At Bernie's is on Showtime, HBO, and Cinemax.
Speaker 1: No way, forget it.
Speaker 4: C'mon, she's your mom!
Speaker 3: Exactly. Weekend At Bernie's! Dead guy getting hit in the groin twenty, thirty times! No?
Speaker 1: Chandler, I gotta tell you, I love your mom's books! I love her books! I cannot get on a plane without one! I mean, this is so cool!
Speaker 3: Yeah, well, you wouldn't think it was cool if you're eleven years old and all your friends are passing around page 79 of 'Mistress Bitch.'
Speaker 5: C'mon, Chandler, I love your mom. I think she's a blast.
Speaker 3: You can say that because she's not your mom.
Speaker 5: Oh, please...

SOLUTION: 3

PROBLEM: Speaker 1: Hello Chandler, lovely day huh? You!
Speaker 2: Phoebe if it helps Alexandra has only been massaging Monica for like three years. If! I said, "If it helps!"
Speaker 1: Why won't you let me massage you?
Speaker 3: Well it's...I mean I'd just-I'd be self-conscious. You're my friend; I'd be naked.
Speaker 1: Monica! We lived together for years! I've seen you naked!
Speaker 3: That's different, we were roommates! And when?!
Speaker 1: I'm curious about the human body.
Speaker 3: Hey, come on Phoebe, you can understand why this would be weird for me.
Speaker 1: But I'm a professional! And I'm really good! Look, if you're uncomfortable we can stop. Just give me a chance, okay. Please?
Speaker 3: Okay, if it means that much to you...
Speaker 1: It does! How would you feel if you couldn't share your cooking? Or-or imagine how Ross would feel if he couldn't teach us about dragons.
Speaker 3: Dinosaurs.
Speaker 1: Potato, potaato.

SOLUTION:
1