Mishnah 5 in chapter 9 of Maseches Gittin deals with two unusual situations: two identical gittin that became mixed up with each other, and a single get written for several couples together.
"Shenayim sheshalchu shnei gittin shavin":
Two husbands sent two identical gittin with messengers - the husbands' names were the same and the wives' names were the same - and the gittin became mixed up with one another. Each get was written for the sake of a different couple, and there is no way to know which one belongs to whom. The Mishnah rules: "nosen shneihem lazo ushneihem lazo" - each of the husbands gives his wife both gittin together, and in this way both women are certainly divorced, even though it is not known which get belongs to which couple.
"Lefichach im avdah mehem - harei hasheni batel" - if one of the two gittin was lost, the remaining one is invalid as well. Since it is no longer possible to use the solution of giving both gittin together, and it is not known for which couple the get that remains in their hands was written, it cannot effect a divorce.
A get written for several couples together:
"Chamishah shekasvu klal besoch haget" - five husbands who wrote one general text listing all the couples: "So-and-so divorces so-and-so, and so-and-so divorces so-and-so," and so on, a kind of mass divorce in a single document. "Ve'edim lematah" - and the witnesses signed at the bottom, their signature relating to all the men listed in the get. In such a case the Mishnah rules: "kulam kesherin" - all the gittin are valid, even though they were written in one uniform text, "venosnin lechol achas ve'achas" - and each husband gives the document to his wife.
However, if "kasav tofes lechol achas ve'achas" - that is, a separate and complete text was written for each and every woman, the tofes being the standard, fixed wording of a get, and in each of them the details of that particular couple were filled in - "ve'edim lematah", with the witnesses signed only at the bottom of the document, then "oso she'ha'edim nikra'im imo kasher": only the last get, the one adjacent to the witnesses' signatures and read together with them, is valid, while the rest of the gittin are invalid.
On what does this ruling depend?
According to Rabbi Meir - who holds that the witnesses who sign the get are the ones who effect the divorce, and that the signature of witnesses is required on the get itself. For that reason only the get that the witnesses are read together with is valid, while the other gittin are invalid, since no signature relates to them.
According to Rabbi Elazar - who holds "edei mesirah karsi", that one may rely on the witnesses who observe the handing over of the get, all the gittin are valid. For five separate gittin were written here, and each one was written for the sake of that particular woman and for the sake of that particular couple; therefore each husband can take the get that was written for him and hand it to his wife in the presence of witnesses to the delivery, and that is sufficient.
In summary: in this Mishnah we learned two rulings. The first - two identical gittin that became mixed up: each husband gives his wife both gittin together, and if one of them was lost, the second is invalid as well. The second - a get written for several couples: if it was written in one general text with the witnesses at the bottom, they are all valid; and if a separate text was written for each and every woman with the witnesses only at the bottom, only the get that the witnesses are read together with is valid - and this is according to Rabbi Meir, while according to Rabbi Elazar, who holds that the witnesses to the delivery effect the divorce, they are all valid.