Maaser Sheni, Chapter 2, Mishnah 5. This mishnah deals with a mixture of chullin coins and Maaser Sheni coins, and with the question of how we divide between them when we have no way of identifying which coins are sanctified and which are chullin.
Coins that scattered and were gathered one by one:
A person had chullin coins, which carry no sanctity at all, together with Maaser Sheni coins, and they spilled and scattered in every direction. When he picks them up one by one, whatever he picks up first is considered Maaser Sheni, until he completes the amount he had with the sanctity of Maaser Sheni. Everything else is chullin. It turns out that if a loss occurred, the loss falls on the chullin.
Coins that became mixed together:
But what is the law when he did not pick up the coins one by one, but rather swept them all together into one pile and put them into a vessel? Here we have before us a mixture of Maaser Sheni coins and chullin coins, and the division is made by calculation, according to the ratio between them: if it is known that sixty percent of all the coins were Maaser Sheni, then sixty percent of the mixture has the status of Maaser Sheni.
The principle that emerges:
"melaktin osam echad echad" - when they are picked up one by one, Maaser Sheni takes first.
Coins mixed together - the division is made according to the calculation and the ratio, and Maaser Sheni has no upper hand over the chullin.
The stipulation one must make, as the Rishonim explain:
The Rishonim explain that in both of these cases a person is required to make a stipulation and say: wherever those coins that I am taking as Maaser Sheni are not truly Maaser Sheni, it is my wish that the Maaser Sheni coins that I did not take - the ones I am assuming to be chullin - should be redeemed onto the coins that I identified as Maaser Sheni.
In this way, even if in fact he did not take the Maaser Sheni coins but rather the chullin coins - which is a very reasonable possibility - a redemption is effected, transferring the true Maaser Sheni coins, which he is unable to identify, onto those chullin coins that he took as Maaser Sheni.
In summary: in this mishnah we learned two laws regarding a mixture of chullin coins and Maaser Sheni coins: one who picks them up one by one - whatever he picks up first is considered Maaser Sheni until the amount is completed, and the rest is chullin; whereas coins that became mixed together are divided according to the calculation of the ratio between them, and Maaser Sheni has no advantage over the chullin. We also learned the stipulation that the Rishonim instructed one to make, by means of which a redemption is effected for the Maaser Sheni coins that he is unable to identify.